]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed a crash when GetMonthControl returns NULL
authorRobin Dunn <robin@alldunn.com>
Fri, 10 May 2002 18:41:57 +0000 (18:41 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 10 May 2002 18:41:57 +0000 (18:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/calctrl.cpp

index 810fa252f57e0fbd3cc4b21385b46dc423133ca6..dd81cba7fee7c65a8b9732f805bea0a5a198d2c4 100644 (file)
@@ -768,7 +768,7 @@ void wxCalendarCtrl::DoGetSize(int *width, int *height) const
     if ( !(GetWindowStyle() & wxCAL_SEQUENTIAL_MONTH_SELECTION) )
     {
         // our real height is bigger
-        if ( height )
+        if ( height && GetMonthControl())
         {
             *height += GetMonthControl()->GetSize().y + VERT_MARGIN;
         }