mirror of
https://github.com/godotengine/godot
synced 2024-09-20 08:38:14 +00:00
Merge pull request #9277 from bd339/iss9266
Add null-check to get_normal_frame
This commit is contained in:
commit
f919be936b
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue