- wxCHECK_MSG(m_parentSizer != NULL ||
- (parentNode && parentNode->GetType() == wxXML_ELEMENT_NODE &&
- m_parentAsWindow), NULL,
- wxT("Sizer must have a window parent node"));
+ if ( !m_parentSizer &&
+ (!parentNode || parentNode->GetType() != wxXML_ELEMENT_NODE ||
+ !m_parentAsWindow) )
+ {
+ wxLogError(_("XRC syntax error: sizer must have a window parent."));
+ return NULL;
+ }