diff options
| author | Benjamin Dahse | 2017-06-20 00:14:32 +0200 |
|---|---|---|
| committer | Benjamin Dahse | 2017-06-20 00:37:34 +0200 |
| commit | b95f57d050bb60e5d514102a3c6a44d3373bce76 (patch) | |
| tree | 171d4158552bdf0c7c1610feaa91b4622ff20edf /scene/2d/animated_sprite.h | |
| parent | b6b225f4c5c3a9b91cc9ae8e9e283b0dd31a54cd (diff) | |
| download | godot-b95f57d050bb60e5d514102a3c6a44d3373bce76.tar.gz godot-b95f57d050bb60e5d514102a3c6a44d3373bce76.tar.zst godot-b95f57d050bb60e5d514102a3c6a44d3373bce76.zip | |
Diffstat (limited to 'scene/2d/animated_sprite.h')
| -rw-r--r-- | scene/2d/animated_sprite.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/animated_sprite.h b/scene/2d/animated_sprite.h index 227445064..80defac07 100644 --- a/scene/2d/animated_sprite.h +++ b/scene/2d/animated_sprite.h @@ -99,7 +99,7 @@ public: const Map<StringName, Anim>::Element *EN = animations.find(E->get().normal_name); - if (p_idx >= EN->get().frames.size()) + if (!EN || p_idx >= EN->get().frames.size()) return Ref<Texture>(); return EN->get().frames[p_idx]; |
