Mercurial > geeqie.yaz
comparison src/image.c @ 203:f8d31b393c2e
fixed crashes with --debug
author | nadvornik |
---|---|
date | Mon, 24 Mar 2008 23:15:29 +0000 |
parents | f6e307c7bad6 |
children | fa0e05f985c3 |
comparison
equal
deleted
inserted
replaced
202:f95654aeec4b | 203:f8d31b393c2e |
---|---|
113 static void image_complete_util(ImageWindow *imd, gint preload) | 113 static void image_complete_util(ImageWindow *imd, gint preload) |
114 { | 114 { |
115 if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return; | 115 if (imd->il && image_get_pixbuf(imd) != image_loader_get_pixbuf(imd->il)) return; |
116 | 116 |
117 if (debug) printf("image load completed \"%s\" (%s)\n", | 117 if (debug) printf("image load completed \"%s\" (%s)\n", |
118 (preload) ? imd->read_ahead_fd->path : imd->image_fd->path, | 118 (preload) ? (imd->read_ahead_fd ? imd->read_ahead_fd->path : "null") : |
119 (imd->image_fd ? imd->image_fd->path : "null"), | |
119 (preload) ? "preload" : "current"); | 120 (preload) ? "preload" : "current"); |
120 | 121 |
121 if (!preload) imd->completed = TRUE; | 122 if (!preload) imd->completed = TRUE; |
122 if (imd->func_complete) imd->func_complete(imd, preload, imd->data_complete); | 123 if (imd->func_complete) imd->func_complete(imd, preload, imd->data_complete); |
123 } | 124 } |
509 *------------------------------------------------------------------- | 510 *------------------------------------------------------------------- |
510 */ | 511 */ |
511 | 512 |
512 static void image_read_ahead_cancel(ImageWindow *imd) | 513 static void image_read_ahead_cancel(ImageWindow *imd) |
513 { | 514 { |
514 if (debug) printf("read ahead cancelled for :%s\n", imd->read_ahead_fd->path); | 515 if (debug) printf("read ahead cancelled for :%s\n", imd->read_ahead_fd ? imd->read_ahead_fd->path : "null"); |
515 | 516 |
516 image_loader_free(imd->read_ahead_il); | 517 image_loader_free(imd->read_ahead_il); |
517 imd->read_ahead_il = NULL; | 518 imd->read_ahead_il = NULL; |
518 | 519 |
519 if (imd->read_ahead_pixbuf) g_object_unref(imd->read_ahead_pixbuf); | 520 if (imd->read_ahead_pixbuf) g_object_unref(imd->read_ahead_pixbuf); |
607 imd->prev_fd = NULL; | 608 imd->prev_fd = NULL; |
608 imd->prev_pixbuf = NULL; | 609 imd->prev_pixbuf = NULL; |
609 imd->prev_color_row = -1; | 610 imd->prev_color_row = -1; |
610 } | 611 } |
611 | 612 |
612 if (debug) printf("post buffer set: %s\n", fd->path); | 613 if (debug) printf("post buffer set: %s\n", fd ? fd->path : "null"); |
613 } | 614 } |
614 | 615 |
615 static gint image_post_buffer_get(ImageWindow *imd) | 616 static gint image_post_buffer_get(ImageWindow *imd) |
616 { | 617 { |
617 gint success; | 618 gint success; |