diff options
Diffstat (limited to 'tipper')
-rw-r--r-- | tipper/popwin.cpp | 14 | ||||
-rw-r--r-- | tipper/version.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/tipper/popwin.cpp b/tipper/popwin.cpp index 2189517..7ff1cee 100644 --- a/tipper/popwin.cpp +++ b/tipper/popwin.cpp @@ -99,15 +99,16 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if(status >= ID_STATUS_OFFLINE && status <= ID_STATUS_IDLE) { TCHAR *swzText = 0; char *status_msg = 0; - if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGET)) - swzText = _tcsdup((TCHAR *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGET, (LPARAM)status, (WPARAM)pwd->clcit.proto)); - else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE)) + if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGET)) { + TCHAR *temp = (TCHAR *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGET, (LPARAM)status, (WPARAM)pwd->clcit.proto); + swzText = _tcsdup(temp); + mir_free(temp); + } else if(ServiceExists(MS_AWAY_GETPROTOSTATUSMESSAGE)) status_msg = (char *)CallService(MS_AWAY_GETPROTOSTATUSMESSAGE, (LPARAM)status, (WPARAM)pwd->clcit.proto); else status_msg = (char *)CallService(MS_AWAYMSG_GETSTATUSMSG, status, 0); - if(status_msg) - swzText = a2t(status_msg); + if(status_msg) swzText = a2t(status_msg); if(swzText) { StripBBCodesInPlace(swzText); @@ -119,8 +120,9 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->rows[pwd->row_count].line_above = true; pwd->row_count++; - mir_free(status_msg); } + + if(status_msg) mir_free(status_msg); } } else if(pwd->clcit.text) { pwd->text_tip = true; diff --git a/tipper/version.h b/tipper/version.h index 31f0f07..cc872e3 100644 --- a/tipper/version.h +++ b/tipper/version.h @@ -4,7 +4,7 @@ #define __MAJOR_VERSION 0
#define __MINOR_VERSION 4
#define __RELEASE_NUM 0
-#define __BUILD_NUM 5
+#define __BUILD_NUM 6
#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
|