summaryrefslogtreecommitdiff
path: root/plugins/SimpleStatusMsg/src/msgbox.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SimpleStatusMsg/src/msgbox.cpp')
-rw-r--r--plugins/SimpleStatusMsg/src/msgbox.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp
index ad4e67970f..0bfa7111c5 100644
--- a/plugins/SimpleStatusMsg/src/msgbox.cpp
+++ b/plugins/SimpleStatusMsg/src/msgbox.cpp
@@ -781,9 +781,9 @@ void SetEditControlText(struct MsgBoxData *data, HWND hwndDlg, int iStatus)
if (!db_get(NULL, "SimpleStatusMsg", setting, &dbv))
{
- if (dbv.pszVal)
+ if (dbv.pszVal && strlen(dbv.pszVal))
{
- if (strlen(dbv.pszVal) && !db_get_ts(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2))
+ if (!db_get_ts(NULL, "SimpleStatusMsg", dbv.pszVal, &dbv2))
{
if (dbv2.ptszVal && lstrlen(dbv2.ptszVal))
{
@@ -1154,8 +1154,6 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
if (bCurrentStatus)
copy_init_data->m_iStatus = ID_STATUS_CURRENT;
- mir_free(init_data);
-
mir_subclassWindow( GetDlgItem(hwndDlg, IDC_EDIT1), EditBoxSubProc);
if (!init_data->m_bOnEvent && IsWindowEnabled(GetDlgItem(hwndDlg, IDC_EDIT1)))
{
@@ -1165,6 +1163,8 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
else
SetFocus(GetDlgItem(hwndDlg, IDC_OK));
+ mir_free(init_data);
+
if (!db_get_b(NULL, "SimpleStatusMsg", "WinCentered", 1))
{
WINDOWPLACEMENT wp;
@@ -1323,6 +1323,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
db_free(&dbv);
break;
}
+ db_free(&dbv);
}
}