]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.cpp
Avoid autosizing widgets with no style
[libs/gltk.git] / 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();