]> git.mxchange.org Git - flightgear.git/commitdiff
Canvas GUI: don't crash if enable decoration on window without content canvas
authorThomas Geymayer <tomgey@gmail.com>
Sat, 27 Jul 2013 20:15:27 +0000 (22:15 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Sat, 27 Jul 2013 20:16:00 +0000 (22:16 +0200)
src/Canvas/window.cxx

index d1bbe90ebb6fd246aeef865f673670aef7b78a63..012915faf80bbee9d5917093b3ee212b53d3b18f 100644 (file)
@@ -211,8 +211,8 @@ namespace canvas
     (
       0,
       0,
-      get<int>("content-size[0]", content->getViewWidth()),
-      get<int>("content-size[1]", content->getViewHeight())
+      get<int>("content-size[0]", content ? content->getViewWidth()  : 400),
+      get<int>("content-size[1]", content ? content->getViewHeight() : 300)
     );
 
     if( _decoration_border.isNone() && !shadow_radius )