wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.77k stars 1.7k forks source link

Fix crash on spin page of widgets sample #24487

Closed PBfordev closed 3 weeks ago

PBfordev commented 4 weeks ago

Attempting to change the style or alignment of the spin controls in the widgets sample made the sample crash. This was caused by a8b4753 (Reconnect events to the widget after recreating it in the sample, 2024-02-19) which resulted in using windows that were previously destroyed.

Fix this by calling NotifyWidgetRecreation() for each spin control only after they were all recreated.

vadz commented 4 weeks ago

Thanks for fixing this! I will merge it soon.