diff options
author | Thomas Herzog <karroffel@users.noreply.github.com> | 2017-06-20 00:44:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-20 00:44:01 +0200 |
commit | f919be936b366f23388a8bcd99941d1fcd7cba73 (patch) | |
tree | d07f9f39fceb7303c7f52cacaa6cfeb195399f53 | |
parent | 86407aebc5d13afb4686f254d3bc10f036611d1b (diff) | |
parent | b95f57d050bb60e5d514102a3c6a44d3373bce76 (diff) |
Merge pull request #9277 from bd339/iss9266
Add null-check to get_normal_frame
-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 2274450647..80defac079 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]; |