1
0
Fork 0

Fix #13002: Crash due to use of dangling types in picker GUI used/saved lists (#13008)

pull/13015/head
Jonathan G Rennison 2024-10-20 09:37:17 +01:00 committed by GitHub
parent 582f37dc15
commit 3105f6391c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 3 deletions

View File

@ -197,10 +197,14 @@ void PickerWindow::ConstructWindow()
this->classes.SetSortFuncs(_class_sorter_funcs); this->classes.SetSortFuncs(_class_sorter_funcs);
this->classes.SetFilterFuncs(_class_filter_funcs); this->classes.SetFilterFuncs(_class_filter_funcs);
if (this->has_type_picker) { /* Update saved type information. */
/* Update used and saved type information. */
this->callbacks.saved = this->callbacks.UpdateSavedItems(this->callbacks.saved); this->callbacks.saved = this->callbacks.UpdateSavedItems(this->callbacks.saved);
/* Clear used type information. */
this->callbacks.used.clear(); this->callbacks.used.clear();
if (this->has_type_picker) {
/* Populate used type information. */
this->callbacks.FillUsedItems(this->callbacks.used); this->callbacks.FillUsedItems(this->callbacks.used);
SetWidgetDisabledState(WID_PW_MODE_ALL, !this->callbacks.HasClassChoice()); SetWidgetDisabledState(WID_PW_MODE_ALL, !this->callbacks.HasClassChoice());