From: Mikko Rasa Date: Sun, 16 Jun 2013 20:21:55 +0000 (+0300) Subject: Avoid autosizing widgets with no style X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=baa066405c5a9e6a34ce5df962bcce7e7e8d319a;p=libs%2Fgltk.git Avoid autosizing widgets with no style --- diff --git a/source/widget.cpp b/source/widget.cpp index 1113c97..3d3b006 100644 --- a/source/widget.cpp +++ b/source/widget.cpp @@ -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();