Nikolay Sivov : comctl32/rebar: Check for null handles before invalidation.

Alexandre Julliard julliard at winehq.org
Mon Dec 28 09:16:07 CST 2009


Module: wine
Branch: master
Commit: 46194d39f63317c6dbe4d55293c45765d01ad42b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=46194d39f63317c6dbe4d55293c45765d01ad42b

Author: Nikolay Sivov <bunglehead at gmail.com>
Date:   Sat Dec 26 19:17:06 2009 +0300

comctl32/rebar: Check for null handles before invalidation.

This prevents all windows invalidation.

---

 dlls/comctl32/rebar.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/comctl32/rebar.c b/dlls/comctl32/rebar.c
index 021bc16..2bb8b92 100644
--- a/dlls/comctl32/rebar.c
+++ b/dlls/comctl32/rebar.c
@@ -802,7 +802,7 @@ REBAR_CalcHorzBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
 	  work.right += SEP_WIDTH;
 	  work.bottom += SEP_WIDTH;
 	  InvalidateRect(infoPtr->hwndSelf, &work, TRUE);
-	  InvalidateRect(lpBand->hwndChild, NULL, TRUE);
+	  if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE);
       }
 
     }
@@ -923,7 +923,7 @@ REBAR_CalcVertBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
 	    work.bottom += SEP_WIDTH;
 	    work.right += SEP_WIDTH;
 	    InvalidateRect(infoPtr->hwndSelf, &work, TRUE);
-	    InvalidateRect(lpBand->hwndChild, NULL, TRUE);
+	    if (lpBand->hwndChild) InvalidateRect(lpBand->hwndChild, NULL, TRUE);
 	}
 
     }




More information about the wine-cvs mailing list