summaryrefslogtreecommitdiff
path: root/protocols/Sametime/src/session_announce_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Sametime/src/session_announce_win.cpp')
-rw-r--r--protocols/Sametime/src/session_announce_win.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/Sametime/src/session_announce_win.cpp b/protocols/Sametime/src/session_announce_win.cpp
index 8daf9494a9..fe30966af1 100644
--- a/protocols/Sametime/src/session_announce_win.cpp
+++ b/protocols/Sametime/src/session_announce_win.cpp
@@ -5,8 +5,6 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
{
SessionAnnounceDialogProc_arg* arg = (SessionAnnounceDialogProc_arg*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
CSametimeProto *proto;
- if (arg != NULL)
- proto = arg->proto;
switch (uMsg) {
case WM_INITDIALOG:
@@ -14,7 +12,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
{
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
- SessionAnnounceDialogProc_arg* arg = (SessionAnnounceDialogProc_arg*)lParam;
+ arg = (SessionAnnounceDialogProc_arg*)lParam;
proto = arg->proto;
proto->debugLog(_T("SessionAnnounceDialogProc WM_INITDIALOG"));
@@ -56,12 +54,14 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
return 0;
case WM_CLOSE:
+ proto = arg->proto;
proto->debugLog(_T("SessionAnnounceDialogProc WM_CLOSE"));
mir_free(arg);
DestroyWindow(hwndDlg);
break;
case WM_COMMAND:
+ proto = arg->proto;
if (HIWORD(wParam) == BN_CLICKED) {
int size;
switch (LOWORD(wParam)) {
@@ -126,6 +126,7 @@ INT_PTR CALLBACK SessionAnnounceDialogProc(HWND hwndDlg, UINT uMsg, WPARAM wPara
}
g_list_free(safArg->recipients);
}
+ mir_free(safArg);
DestroyWindow(hwndDlg);
}