summaryrefslogtreecommitdiff
path: root/src/graphic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/graphic.c')
-rw-r--r--src/graphic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graphic.c b/src/graphic.c
index 8c995b3..b01714e 100644
--- a/src/graphic.c
+++ b/src/graphic.c
@@ -276,7 +276,9 @@ int renderSprites(SDL_Renderer *rend, gameUI_t *gUI) {
renderItem_t *renderList = gUI->renderList;
- for(i=0,res=0 ; i < gUI->renderListSize && res==0 ; i++) {
+ for(i=0,res=0 ; i < MAX_RENDERLIST_SIZE && res==0 ; i++) {
+ if (renderList[i].sprite == NULL) continue;
+
src = dst = renderList[i].sprite->size;
src.y = src.h * renderList[i].currframe;
if ( renderList[i].absolute ) {