From c319d824b5aaba55010e4b966593714ee3c5b1c6 Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 20 Aug 2010 11:37:37 +0000 Subject: Fix crash bug on empty altcombobox. --- client/widgets/altcombobox.cc | 4 ++-- 1 file 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()); -- cgit v1.2.3