summaryrefslogtreecommitdiff
path: root/plugins/PluginUpdater/src/DlgListNew.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PluginUpdater/src/DlgListNew.cpp')
-rw-r--r--plugins/PluginUpdater/src/DlgListNew.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/PluginUpdater/src/DlgListNew.cpp b/plugins/PluginUpdater/src/DlgListNew.cpp
index eded09dc1e..255066ea01 100644
--- a/plugins/PluginUpdater/src/DlgListNew.cpp
+++ b/plugins/PluginUpdater/src/DlgListNew.cpp
@@ -40,7 +40,7 @@ static void ApplyDownloads(void *param)
// if we need to escalate priviledges, launch a atub
if (!PrepareEscalation()) {
- DestroyWindow(hDlg);
+ EndDialog(hDlg, 0);
return;
}
@@ -118,9 +118,7 @@ static void ApplyDownloads(void *param)
if (rc == IDYES)
CallFunctionAsync(OpenPluginOptions, 0);
- CloseWindow(hDlg);
- DestroyWindow(hDlg);
- hwndDialog = NULL;
+ EndDialog(hDlg, 0);
return;
}
@@ -363,6 +361,10 @@ INT_PTR CALLBACK DlgList(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
}
break;
+ case WM_CLOSE:
+ DestroyWindow(hDlg);
+ break;
+
case WM_DESTROY:
Utils_SaveWindowPosition(hDlg, NULL, MODNAME, "ListWindow");
Skin_ReleaseIcon((HICON)SendMessage(hDlg, WM_SETICON, ICON_BIG, 0));