Mercurial > geeqie
changeset 203:f8d31b393c2e
fixed crashes with --debug
author | nadvornik |
---|---|
date | Mon, 24 Mar 2008 23:15:29 +0000 |
parents | f95654aeec4b |
children | d662d680250d |
files | src/image.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/image.c Mon Mar 24 20:42:39 2008 +0000 +++ b/src/image.c Mon Mar 24 23:15:29 2008 +0000 @@ -115,7 +115,8 @@ if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return; if (debug) printf("image load completed \"%s\" (%s)\n", - (preload) ? imd->read_ahead_fd->path : imd->image_fd->path, + (preload) ? (imd->read_ahead_fd ? imd->read_ahead_fd->path : "null") : + (imd->image_fd ? imd->image_fd->path : "null"), (preload) ? "preload" : "current"); if (!preload) imd->completed = TRUE; @@ -511,7 +512,7 @@ static void image_read_ahead_cancel(ImageWindow *imd) { - if (debug) printf("read ahead cancelled for :%s\n", imd->read_ahead_fd->path); + if (debug) printf("read ahead cancelled for :%s\n", imd->read_ahead_fd ? imd->read_ahead_fd->path : "null"); image_loader_free(imd->read_ahead_il); imd->read_ahead_il = NULL; @@ -609,7 +610,7 @@ imd->prev_color_row = -1; } - if (debug) printf("post buffer set: %s\n", fd->path); + if (debug) printf("post buffer set: %s\n", fd ? fd->path : "null"); } static gint image_post_buffer_get(ImageWindow *imd)