[gthumb] check if filename is not null before using it



commit 4f444a89f0318021591c01cc16a686860f235aad
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Tue Dec 28 14:07:30 2010 +0100

    check if filename is not null before using it

 .../image_viewer/gth-metadata-provider-image.c     |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/extensions/image_viewer/gth-metadata-provider-image.c b/extensions/image_viewer/gth-metadata-provider-image.c
index e712de2..8cf321e 100644
--- a/extensions/image_viewer/gth-metadata-provider-image.c
+++ b/extensions/image_viewer/gth-metadata-provider-image.c
@@ -60,6 +60,9 @@ gth_metadata_provider_image_read (GthMetadataProvider *self,
 		return;
 
 	filename = g_file_get_path (file_data->file);
+	if (filename == NULL)
+		return;
+
 	format = gdk_pixbuf_get_file_info (filename, &width, &height);
 	if (format != NULL) {
 		char *size;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]