summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/PluginUpdater/src/DlgUpdate.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/PluginUpdater/src/DlgUpdate.cpp b/plugins/PluginUpdater/src/DlgUpdate.cpp
index 9d97a09dd6..c7f02157ce 100644
--- a/plugins/PluginUpdater/src/DlgUpdate.cpp
+++ b/plugins/PluginUpdater/src/DlgUpdate.cpp
@@ -51,7 +51,7 @@ static void ApplyUpdates(void *param)
// 1) If we need to escalate priviledges, launch a stub
if (!PrepareEscalation()) {
- DestroyWindow(hDlg);
+ EndDialog(hDlg, 0);
return;
}
@@ -137,7 +137,8 @@ static void ApplyUpdates(void *param)
// 5) Prepare Restart
int rc = MessageBox(hDlg, TranslateT("Update complete. Press Yes to restart Miranda now or No to postpone a restart until the exit."), TranslateT("Plugin Updater"), MB_YESNO | MB_ICONQUESTION);
- DestroyWindow(hDlg);
+ EndDialog(hDlg, 0);
+ PostMessage(hDlg, WM_DESTROY, 0, 0); // why do we have to call this manually?
if (rc == IDYES)
CallFunctionAsync(RestartMe, 0);
}