diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -86,7 +86,8 @@ void key_reload(){ } void key_next(){ if(mode != MODE_CTL){ - curimg->state &= LOADED | SLOWLOADED; + if(curimg) + curimg->state &= LOADED | SLOWLOADED; freeimage(previmg); previmg = curimg; curimg = nextimg; @@ -100,7 +101,8 @@ void key_next(){ } void key_prev(){ if(mode != MODE_CTL){ - curimg->state &= LOADED | SLOWLOADED; + if(curimg) + curimg->state &= LOADED | SLOWLOADED; freeimage(nextimg); nextimg = curimg; curimg = previmg; |