mirror of
https://github.com/zoriya/Gamacon.git
synced 2026-06-03 04:02:35 +00:00
Adding checks to the set anim
This commit is contained in:
@@ -13,6 +13,8 @@ void rend_set_anim(struct renderer *rend, const char *name)
|
||||
{
|
||||
gc_animholder *holder = (gc_animholder *)rend->data;
|
||||
|
||||
if (rend->type != GC_ANIMREND || !holder)
|
||||
return;
|
||||
if (holder->current && !my_strcmp(holder->current->name, name))
|
||||
return;
|
||||
for (int i = 0; i < holder->animcount; i++) {
|
||||
@@ -22,5 +24,4 @@ void rend_set_anim(struct renderer *rend, const char *name)
|
||||
return;
|
||||
}
|
||||
}
|
||||
my_printf("Gamacon: unknown animation %s.\n", name);
|
||||
}
|
||||
Reference in New Issue
Block a user