]> git.tdb.fi Git - libs/gltk.git/commitdiff
Avoid autosizing widgets with no style
authorMikko Rasa <tdb@tdb.fi>
Sun, 16 Jun 2013 20:21:55 +0000 (23:21 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 16 Jun 2013 20:34:54 +0000 (23:34 +0300)
source/widget.cpp

index 1113c971974f84779a3ca863df1b57f4ddf973ea..3d3b0068ad6f394b905d8e6854dafdfeebf9769e 100644 (file)
@@ -40,6 +40,9 @@ void Widget::set_size(unsigned w, unsigned h)
 
 void Widget::autosize()
 {
+       if(!style)
+               return;
+
        geom.w = 0;
        geom.h = 0;
        const Style::PartSeq &parts = style->get_parts();