summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcpaint.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-04-06 15:06:36 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-04-06 15:06:36 +0000
commit802101bbe028273db5a07017e1e5c3ed99c5bfa4 (patch)
treecb26b55a0350db4a2942a199cd3b14566a99d057 /plugins/Clist_modern/src/modern_clcpaint.cpp
parent19c9aa7db13dc078b7aeee689a7bee708a455432 (diff)
Clist modern: Minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@12632 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcpaint.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcpaint.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp
index 83f8fcedb0..c3cd45e234 100644
--- a/plugins/Clist_modern/src/modern_clcpaint.cpp
+++ b/plugins/Clist_modern/src/modern_clcpaint.cpp
@@ -558,6 +558,9 @@ void CLCPaint::_AddParamShort(MODERNMASK *mpModernMask, DWORD dwParamIndex, DWO
MODERNMASK *CLCPaint::_GetCLCContactRowBackModernMask(ClcGroup *group, ClcContact *Drawing, int indent, int index, BOOL selected, BOOL hottrack, ClcData *dat)
{
+ if (Drawing == NULL)
+ return 0;
+
char buf[BUF2SIZE] = { 0 };
MODERNMASK *mpModernMask = (MODERNMASK*)mir_calloc(sizeof(MODERNMASK));
@@ -566,7 +569,7 @@ MODERNMASK *CLCPaint::_GetCLCContactRowBackModernMask(ClcGroup *group, ClcContac
switch (Drawing->type) {
case CLCIT_GROUP:
_AddParamShort(mpModernMask, hi_Type, hi_Group);
- _AddParamShort(mpModernMask, hi_Open, (Drawing && Drawing->group && Drawing->group->expanded) ? hi_True : hi_False);
+ _AddParamShort(mpModernMask, hi_Open, (Drawing->group && Drawing->group->expanded) ? hi_True : hi_False);
_AddParamShort(mpModernMask, hi_IsEmpty, (Drawing->group->cl.count == 0) ? hi_True : hi_False);
break;
@@ -1995,12 +1998,13 @@ void CLCPaint::_PaintClc(HWND hwnd, ClcData *dat, HDC hdc, RECT *_rcPaint)
// Draw background
_DrawBackground(hwnd, dat, paintMode, rcPaint, clRect, pc);
// Draw lines
- if (dat->row_heights)
+ if (dat->row_heights) {
_DrawLines(hwnd, dat, paintMode, rcPaint, clRect, pc);
- //insertion mark
- if (dat->iInsertionMark != -1)
- _DrawInsertionMark(dat, clRect, pc);
+ //insertion mark
+ if (dat->iInsertionMark != -1)
+ _DrawInsertionMark(dat, clRect, pc);
+ }
// BitBlt from memory to destination
_CopyPaintToDest(hdc, paintMode, rcPaint, pc);