mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
Fix null pointer dereferences found by clang-tidy
This commit is contained in:
parent
5cecd78234
commit
67b6a763c3
2 changed files with 2 additions and 2 deletions
|
@ -635,7 +635,7 @@ SYMBOL_EXPORT void AnimateCharacter(struct Game* game, struct Character* charact
|
|||
|
||||
int pos = character->pos;
|
||||
|
||||
while (character->delta >= character->frame->duration) {
|
||||
while (character->frame && character->delta >= character->frame->duration) {
|
||||
bool reachedEnd = false;
|
||||
character->delta -= character->frame->duration;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ SYMBOL_INTERNAL void DrawGamestates(struct Game* game) {
|
|||
}
|
||||
tmp = tmp->next;
|
||||
}
|
||||
if (game->loading.shown && game->_priv.loading.gamestate->api->predraw) {
|
||||
if (game->loading.shown && game->_priv.loading.gamestate && game->_priv.loading.gamestate->api->predraw) {
|
||||
game->_priv.current_gamestate = game->_priv.loading.gamestate;
|
||||
game->_priv.loading.gamestate->api->predraw(game, game->_priv.loading.gamestate->data);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue