DarkRadiant: master 59ec3282

Author Committer Branch Timestamp Parent
orbweaver orbweaver master 29.11.2022 20:32 master 751cd7ad
Affected Issues  0006178: Sporadic assertion failure on shutdown due to LocalBitmapArtProvider destruction
Changeset 0006178: avoid potential use of initialised size vector in TextureThumbnailBrowser

Valgrind flagged up a possible "jump based on uninitialised value",
which appeared to be caused by the _viewportSize vector in
TextureThumbnailBrowser. This vector was left uninitialised at
construction, and subsequently set to a real value after receiving a
wxEVT_SIZE event, which is not guaranteed to happen.

The _viewportSize value is now an std::optional which is initialised on
demand when the getViewportSize() private method is called (as well as
being updated by the wxEVT_SIZE event as before).
mod - radiant/ui/texturebrowser/TextureBrowserPanel.cpp Diff File
mod - radiant/ui/texturebrowser/TextureThumbnailBrowser.cpp Diff File
mod - radiant/ui/texturebrowser/TextureThumbnailBrowser.h Diff File