mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-19 08:37:22 -05:00
The tabOrder vector was initialized with the size of tabNames. Then new tabs were registered with AddSetupTabCallback() causing tabNames to grow but tabOrder to remain the same. Usually this is not a problem as LoadTabOrder() will be called which ensures that their sizes are in sync. However, when using a fresh OBS install or one with a corrupted scene configuration file, the on_save() callbacks are called before any loading callbacks. With the sizes of tabNames and tabOrder not being in sync this would lead to a crash. Fixed by adding a tabWidgetOrderValid() check within SaveTabOrder() before iterating over both vectors. The tabWidgetOrderValid() was expanded to check the sizes of both vectors. Additionally the tabOrder initialization was moved from global static initialization to function local static initialization to ensure that potential preceeding calls to AddSetupTabCallback() will be taken into account when setting up the tabOrder vector. |
||
|---|---|---|
| .. | ||
| legacy | ||
| linux | ||
| macro | ||
| osx | ||
| queue | ||
| utils | ||
| variables | ||
| win | ||
| advanced-scene-switcher.cpp | ||
| advanced-scene-switcher.hpp | ||
| general.cpp | ||
| platform-funcs.hpp | ||
| switcher-data.cpp | ||
| switcher-data.hpp | ||
| version.h | ||