diff options
author | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:16 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-12-08 20:12:26 +0300 |
commit | 8ffc77be71507825a8f7585bcabff8ccc370206a (patch) | |
tree | aa13a8070f31286db6ad22e17a577e547942f951 /plugins/TipperYM | |
parent | 41b2fdfc654e3eec07c97ceba00cda13d988ffff (diff) |
db_get_sa / db_get_wsa to receive the default value, massive code simplification
Diffstat (limited to 'plugins/TipperYM')
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index db2e28460c..79fa139f47 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -328,13 +328,8 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa char szIconProto[64]; if (mir_strcmp(szProto, META_PROTO) != 0) strncpy_s(szIconProto, szProto, _TRUNCATE); - else { - ptrA szXProto(db_get_sa(pwd->hContact, szProto, "XStatusProto")); - if (szXProto != NULL) - strncpy_s(szIconProto, szXProto, _TRUNCATE); - else - szIconProto[0] = 0; - } + else + strncpy_s(szIconProto, ptrA(db_get_sa(pwd->hContact, szProto, "XStatusProto", "")), _TRUNCATE); pwd->extraIcons[i].hIcon = (HICON)CallProtoService(szIconProto, PS_GETCUSTOMSTATUSICON, (WPARAM)iXstatus, LR_SHARED); pwd->extraIcons[i].bDestroy = false; |