Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6178: avoid potential use of initialised size vector in TextureThumb…
…nailBrowser 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).
- Loading branch information
Matthew Mott
committed
Nov 29, 2022
1 parent
751cd7a
commit 59ec328
Showing
3 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters