X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78d14f80e9a72041ede52c30d912ec5cef21b1b3..efd1393bccefbb6cf12f82d5e10a4fb6080e6702:/src/xrc/xh_toolb.cpp?ds=sidebyside diff --git a/src/xrc/xh_toolb.cpp b/src/xrc/xh_toolb.cpp index e8c125341f..c86e521763 100644 --- a/src/xrc/xh_toolb.cpp +++ b/src/xrc/xh_toolb.cpp @@ -101,8 +101,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource() { wxObject *created = CreateResFromNode(n, toolbar, NULL); wxControl *control = wxDynamicCast(created, wxControl); - if (IsOfClass(n, wxT("tool")) && - IsOfClass(n, wxT("separator")) && + if (!IsOfClass(n, wxT("tool")) && + !IsOfClass(n, wxT("separator")) && control != NULL) toolbar->AddControl(control); }