Fixed warning about modal dialog shown while previous dialog is open.

This commit is contained in:
hiker
2014-04-04 16:44:55 +11:00
parent c663839d98
commit 34d79a8cd2

View File

@@ -255,7 +255,13 @@ GUIEngine::EventPropagation AddonsLoading::processEvent(const std::string& event
void AddonsLoading::voteClicked()
{
if (Online::CurrentUser::get()->isRegisteredUser())
new VoteDialog(m_addon.getId());
{
// We need to keep a copy of the addon, since dismiss() will
// delete this object.
Addon addon = m_addon;
dismiss();
new VoteDialog(addon.getId());
}
} // voteClicked
// ----------------------------------------------------------------------------