diff options
Diffstat (limited to 'client/widgets/radiobutton.cc')
-rw-r--r-- | client/widgets/radiobutton.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/client/widgets/radiobutton.cc b/client/widgets/radiobutton.cc index 55e3379..af34de6 100644 --- a/client/widgets/radiobutton.cc +++ b/client/widgets/radiobutton.cc @@ -29,7 +29,14 @@ RadioButton::RadioButton(QDomNode node) : QRadioButton() { QDomElement elem = node.toElement(); - widget_name = elem.attribute("name"); + + if(elem.hasAttribute("name")) { + widget_name = elem.attribute("name"); + } else { + printf("XML ERROR!! Unnamed widget of type: %s\n", + elem.tagName().toStdString().c_str()); + } + if(elem.hasAttribute("caption")) { setText(elem.attribute("caption")); } else { |