]> git.mxchange.org Git - flightgear.git/commitdiff
Canvas: Don't crash if texture not available
authorThomas Geymayer <tomgey@gmail.com>
Sun, 12 Aug 2012 18:21:14 +0000 (20:21 +0200)
committerThomas Geymayer <tomgey@gmail.com>
Sun, 12 Aug 2012 18:23:31 +0000 (20:23 +0200)
src/Canvas/elements/CanvasImage.cxx

index 62a2e4dc23316902269e34c50497c2cb97ca427b..e0bbbb764d78e50ee166612b3f2d4b2a75017862 100644 (file)
@@ -323,6 +323,9 @@ namespace canvas
                               ? _canvas.lock()->getTexture()
                               : _texture.get();
 
+    if( !texture )
+      return Rect<int>();
+
     return Rect<int>
     (
       0,0,