X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/953704c1c76cfb9cfb7b91f0e81f98c30d27eb56..6f349458f6903083bd967f52624a5e639733ad5d:/src/gtk/checkbox.cpp?ds=inline

diff --git a/src/gtk/checkbox.cpp b/src/gtk/checkbox.cpp
index 75cf233c65..af1d2592c3 100644
--- a/src/gtk/checkbox.cpp
+++ b/src/gtk/checkbox.cpp
@@ -72,11 +72,12 @@ bool wxCheckBox::Create(wxWindow *parent,
     m_needParent = TRUE;
     m_acceptsFocus = TRUE;
 
-    PreCreation( parent, id, pos, size, style, name );
-
-#if wxUSE_VALIDATORS
-    SetValidator( validator );
-#endif
+    if (!PreCreation( parent, pos, size ) ||
+        !CreateBase( parent, id, pos, size, style, validator, name ))
+    {
+        wxFAIL_MSG( _T("wxCheckBox creation failed") );
+	return FALSE;
+    }
 
     wxControl::SetLabel( label );