Canvas: Don't crash if texture not available
This commit is contained in:
parent
e6cb846ad3
commit
624522b426
1 changed files with 3 additions and 0 deletions
|
@ -323,6 +323,9 @@ namespace canvas
|
||||||
? _canvas.lock()->getTexture()
|
? _canvas.lock()->getTexture()
|
||||||
: _texture.get();
|
: _texture.get();
|
||||||
|
|
||||||
|
if( !texture )
|
||||||
|
return Rect<int>();
|
||||||
|
|
||||||
return Rect<int>
|
return Rect<int>
|
||||||
(
|
(
|
||||||
0,0,
|
0,0,
|
||||||
|
|
Loading…
Add table
Reference in a new issue