From: Robin Dunn <robin@alldunn.com>
Date: Thu, 26 Oct 2006 16:19:36 +0000 (+0000)
Subject: fixed compile error (jump to label bypasses initialization, or
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/b80e3a2a4fe23568edf2cc1580b330bad7ff0f51

fixed compile error (jump to label bypasses initialization, or
something like that...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp
index 9eab50bd69..3e68168a22 100644
--- a/src/mac/carbon/listctrl_mac.cpp
+++ b/src/mac/carbon/listctrl_mac.cpp
@@ -154,10 +154,13 @@ static pascal OSStatus wxMacListCtrlEventHandler( EventHandlerCallRef handler ,
                 break; 
             }
         case kEventControlDraw:
-            CGContextRef context = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, typeCGContextRef) ;
-            window->MacSetDrawingContext(context);
-            result = CallNextEventHandler(handler, event);
-            window->MacSetDrawingContext(NULL);
+            {
+                CGContextRef context = cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, typeCGContextRef) ;
+                window->MacSetDrawingContext(context);
+                result = CallNextEventHandler(handler, event);
+                window->MacSetDrawingContext(NULL);
+                break;
+            }
         default :
             break ;
     }