diff --git a/src/osx/window_osx.cpp b/src/osx/window_osx.cpp index bca9a12ddb..d03e3b2467 100644 --- a/src/osx/window_osx.cpp +++ b/src/osx/window_osx.cpp @@ -1269,6 +1269,11 @@ bool wxWindowMac::OSXShowWithEffect(bool show, void wxWindowMac::DoEnable(bool enable) { + // We can be called before the window is created in order to create it in + // the initially disabled state. + if ( !GetPeer() ) + return; + GetPeer()->Enable( enable ) ; MacInvalidateBorders(); }