From 800a012283803b57224921b5f182aac3ddb1c40f Mon Sep 17 00:00:00 2001 From: hiker Date: Sat, 5 Apr 2014 22:25:35 +1100 Subject: [PATCH] Removed unnecessary copy of Addon. --- src/states_screens/dialogs/addons_loading.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/states_screens/dialogs/addons_loading.cpp b/src/states_screens/dialogs/addons_loading.cpp index 229d0e026..304e08b48 100644 --- a/src/states_screens/dialogs/addons_loading.cpp +++ b/src/states_screens/dialogs/addons_loading.cpp @@ -254,11 +254,11 @@ void AddonsLoading::voteClicked() { if (Online::CurrentUser::get()->isRegisteredUser()) { - // We need to keep a copy of the addon, since dismiss() will - // delete this object. - Addon addon = m_addon; + // We need to keep a copy of the addon id, since dismiss() will + // delete this object (and the copy of the addon). + std::string addon_id = m_addon.getId(); dismiss(); - new VoteDialog(addon.getId()); + new VoteDialog(addon_id); } } // voteClicked