summaryrefslogtreecommitdiff
path: root/client/widgets/altcombobox.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-20 11:37:37 +0000
committerdeva <deva>2010-08-20 11:37:37 +0000
commitc319d824b5aaba55010e4b966593714ee3c5b1c6 (patch)
treeae32e13eb769330123cc7ecf6d01df9778f8de8d /client/widgets/altcombobox.cc
parent93640979082aeea91953e6299445a90760313866 (diff)
Fix crash bug on empty altcombobox.
Diffstat (limited to 'client/widgets/altcombobox.cc')
-rw-r--r--client/widgets/altcombobox.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/widgets/altcombobox.cc b/client/widgets/altcombobox.cc
index b59541b..224822e 100644
--- a/client/widgets/altcombobox.cc
+++ b/client/widgets/altcombobox.cc
@@ -125,8 +125,8 @@ AltComboBox::AltComboBox(QDomNode &node, MacroWindow *macrowindow)
if(innerwidget)
connect(innerwidget, SIGNAL(wasChanged()), this, SLOT(onChildChange()));
- frame->layout()->setContentsMargins(0,0,0,0);
- altframe->layout()->setContentsMargins(0,0,0,0);
+ if(frame->layout()) frame->layout()->setContentsMargins(0,0,0,0);
+ if(altframe->layout()) altframe->layout()->setContentsMargins(0,0,0,0);
frame->show(); // Force altframe to get resized to its real size.
altframerepl->setFixedHeight(altframe->height());