diff options
author | John Hawthorn <jhawthor@uvic.ca> | 2008-06-27 12:54:03 -0700 |
---|---|---|
committer | John Hawthorn <jhawthor@uvic.ca> | 2008-06-27 12:54:03 -0700 |
commit | 4f52b46206ef7c4886349f7bf2c2ab047e81523d (patch) | |
tree | a5a946b336721003e6c28bdbbfdadf13a5523db5 | |
parent | 7cb3dabb0e3370fe06e58352f91580388fd50337 (diff) | |
download | mirror-meh-4f52b46206ef7c4886349f7bf2c2ab047e81523d.tar.gz mirror-meh-4f52b46206ef7c4886349f7bf2c2ab047e81523d.tar.bz2 mirror-meh-4f52b46206ef7c4886349f7bf2c2ab047e81523d.zip |
2 minor bugs
-rw-r--r-- | src/bmp.c | 1 | ||||
-rw-r--r-- | src/main.c | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -84,6 +84,7 @@ struct image *bmp_open(FILE *f){ if(b->bpp >= 16){ b->rowwidth = b->img.width * b->bpp / 8; + b->colours = NULL; }else{ int i; b->colours = malloc(b->ncolors * sizeof(struct rgb_t)); @@ -161,7 +161,8 @@ void run(){ img->fmt->close(img); continue; /* Allow for some events to be read, read is slow */ } - ximg = getimage(img, width, height); + if(!ximg) + ximg = getimage(img, width, height); drawimage(ximg, width, height); redraw = 0; } |