]> git.saurik.com Git - wxWidgets.git/commitdiff
Handle NULL flags argument in wxOSX wxNotebook::HitTest().
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 14 Jun 2013 13:06:46 +0000 (13:06 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 14 Jun 2013 13:06:46 +0000 (13:06 +0000)
Don't crash if flags are not specified, this parameter is optional.

Closes #15256.

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

src/osx/cocoa/notebook.mm

index 973fcf5adeba289bc46e8d1dbb9d57581ebd3297..86820dc0eaf4c8effe7c36aacab8b09205e06d27 100644 (file)
@@ -272,10 +272,12 @@ public:
         NSTabViewItem* hitItem = [slf tabViewItemAtPoint:nspt];
         
         if (!hitItem) {
-            *flags = wxBK_HITTEST_NOWHERE;
+            if ( flags )
+                *flags = wxBK_HITTEST_NOWHERE;
         } else {
             retval = [slf indexOfTabViewItem:hitItem];
-            *flags = wxBK_HITTEST_ONLABEL;
+            if ( flags )
+                *flags = wxBK_HITTEST_ONLABEL;
         }
         
         return retval;