diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2015-02-28 11:05:09 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2015-02-28 11:05:09 +0000 |
commit | b1530a48bd67d19f6a18355e04a884b36c696e8b (patch) | |
tree | 539cc8c4387b586658898a146b8876cc133f8783 /plugins/TipperYM/src/popwin.cpp | |
parent | 4e2a8eb11a9a4286eb0bcb3386bab58e87ae4b69 (diff) |
Tipper:
- minor bugfixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@12284 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TipperYM/src/popwin.cpp')
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index b1bad12c69..18be576c2e 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -22,15 +22,17 @@ Boston, MA 02111-1307, USA. __inline void AddRow(PopupWindowData *pwd, TCHAR *swzLabel, TCHAR *swzValue, char *szProto, bool bParseSmileys, bool bNewline, bool bLineAbove, bool bIsTitle = false, HICON hIcon = NULL) { - pwd->rows = (RowData *)mir_realloc(pwd->rows, sizeof(RowData) * (pwd->iRowCount + 1)); + RowData *pRows = (RowData *)mir_realloc(pwd->rows, sizeof(RowData) * (pwd->iRowCount + 1)); + if (pRows == NULL) + return; + pwd->rows = pRows; pwd->rows[pwd->iRowCount].swzLabel = swzLabel ? mir_tstrdup(swzLabel) : NULL; pwd->rows[pwd->iRowCount].swzValue = swzValue ? mir_tstrdup(swzValue) : NULL; pwd->rows[pwd->iRowCount].spi = bParseSmileys ? Smileys_PreParse(swzValue, (int)_tcslen(swzValue), szProto) : NULL; pwd->rows[pwd->iRowCount].bValueNewline = bNewline; pwd->rows[pwd->iRowCount].bLineAbove = bLineAbove; pwd->rows[pwd->iRowCount].bIsTitle = bIsTitle; - pwd->rows[pwd->iRowCount].hIcon = hIcon; - pwd->iRowCount++; + pwd->rows[pwd->iRowCount++].hIcon = hIcon; } LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) @@ -1141,7 +1143,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa } // titlebar height - if (!pwd->bIsTextTip && pwd->swzTitle && opt.bShowTitle) { + if (!pwd->bIsTextTip && opt.bShowTitle) { smr.top = smr.bottom = 0; smr.left = rc.left + opt.iPadding + pwd->iIndent; smr.right = rc.right; |