Codefix: do not leave pointers to stack allocations in globals

This commit is contained in:
Rubidium
2025-03-15 12:11:38 +01:00
committed by rubidium42
parent dae788e2e3
commit c13226cdf8
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1833,7 +1833,7 @@ void ViewportDoDraw(const Viewport *vp, int left, int top, int right, int bottom
dp.zoom = ZOOM_LVL_MIN;
dp.width = UnScaleByZoom(dp.width, zoom);
dp.height = UnScaleByZoom(dp.height, zoom);
_cur_dpi = &dp;
AutoRestoreBackup cur_dpi(_cur_dpi, &dp);
if (vp->overlay != nullptr && vp->overlay->GetCargoMask() != 0 && vp->overlay->GetCompanyMask().Any()) {
/* translate to window coordinates */