From: Robin Dunn Date: Fri, 10 May 2002 18:41:57 +0000 (+0000) Subject: Fixed a crash when GetMonthControl returns NULL X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5b3610dab2f75e518fefa8a9ad3076b6366b054a Fixed a crash when GetMonthControl returns NULL git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15488 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/calctrl.cpp b/src/generic/calctrl.cpp index 810fa252f5..dd81cba7fe 100644 --- a/src/generic/calctrl.cpp +++ b/src/generic/calctrl.cpp @@ -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; }