# HG changeset patch # User nadvornik # Date 1206400529 0 # Node ID f8d31b393c2ec849f4477b93a60e4b6f22dde691 # Parent f95654aeec4b3f9bee802a6143dd580782cc44c9 fixed crashes with --debug diff -r f95654aeec4b -r f8d31b393c2e src/image.c --- 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)