summaryrefslogtreecommitdiff
path: root/client/widgets/radiobutton.cc
diff options
context:
space:
mode:
authorsenator <senator>2007-07-26 13:10:25 +0000
committersenator <senator>2007-07-26 13:10:25 +0000
commite1bbdd89f09966a240e8a7b8007dc44895e0febd (patch)
tree0e990d7a9df1d7c2fc53aaee0bc52990a6607b60 /client/widgets/radiobutton.cc
parentce667bf4b2f3de7aab677ac7e7f23bc72d3db80f (diff)
added error check for unnamed widgets
Diffstat (limited to 'client/widgets/radiobutton.cc')
-rw-r--r--client/widgets/radiobutton.cc9
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 {