Change window allocation/destruction to avoid undefined behaviour
Create a new window base class which holds the front/back pointers and the window class. This fixes the voluminous warning spam about deleted windows when using UndefinedBehaviorSanitizer.
This commit is contained in:
@@ -480,7 +480,7 @@ static void SetViewportPosition(Window *w, int x, int y, bool force_update_overl
|
||||
i = top + height - _screen.height;
|
||||
if (i >= 0) height -= i;
|
||||
|
||||
if (height > 0) DoSetViewportPosition(w->z_front, left, top, width, height);
|
||||
if (height > 0) DoSetViewportPosition((const Window *) w->z_front, left, top, width, height);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user