Permalink
Browse files

AddonBrowser: check if dialog was confirmed instead of checking if it…

… wasn't multiselection and if anything was selected. We might skip CGUIDialogSelect::OnBack when we close dialog (for example when we reload skin).

Fixes crash when we reload skin while in skin selection dialog. GUIWindowSettingsCategory didn't catch that we in fact canceled dialog and tried to proceed with changing setting (that we already deleted when closing settings window) causing bad memory access.
  • Loading branch information...
1 parent 4f196ae commit a435fa8881d84c4de271e2345bf561efccbe2e21 @pieh pieh committed Aug 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 xbmc/addons/GUIWindowAddonBrowser.cpp
@@ -471,7 +471,7 @@ int CGUIWindowAddonBrowser::SelectAddonID(const vector<ADDON::TYPE> &types, CStd
g_windowManager.ActivateWindow(WINDOW_ADDON_BROWSER, params);
return 2;
}
- if (!multipleSelection && dialog->GetSelectedLabel() == -1)
+ if (!dialog->IsConfirmed())
return 0;
addonIDs.clear();
const CFileItemList& list = dialog->GetSelectedItems();

0 comments on commit a435fa8

Please sign in to comment.