diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 1b62dbc3dc..96650224bb 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -983,7 +983,10 @@ wxXmlResource::DoCreateResFromNode(wxXmlNode& node, return NULL; } - if ( !node.GetChildren() ) + const bool hasOnlyRefAttr = node.GetAttributes() != NULL && + node.GetAttributes()->GetNext() == NULL; + + if ( hasOnlyRefAttr && !node.GetChildren() ) { // In the typical, simple case, is used to link // to another node and doesn't have any content of its own that