[evince] [libview] Fix a crash when loading document with inverted colors enabled



commit fbbc1a0d02847de2b0a0ddbae8cf33bfec9dab81
Author: Carlos Garcia Campos <carlosgc gnome org>
Date:   Tue Jul 27 18:23:30 2010 +0200

    [libview] Fix a crash when loading document with inverted colors enabled

 libview/ev-pixbuf-cache.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 74b8674..367f70d 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -777,11 +777,11 @@ ev_pixbuf_cache_set_inverted_colors (EvPixbufCache *pixbuf_cache,
 		CacheJobInfo *job_info;
 
 		job_info = pixbuf_cache->prev_job + i;
-		if (job_info->surface)
+		if (job_info && job_info->surface)
 			ev_document_misc_invert_surface (job_info->surface);
 
 		job_info = pixbuf_cache->next_job + i;
-		if (job_info->surface)
+		if (job_info && job_info->surface)
 			ev_document_misc_invert_surface (job_info->surface);
 	}
 
@@ -789,7 +789,7 @@ ev_pixbuf_cache_set_inverted_colors (EvPixbufCache *pixbuf_cache,
 		CacheJobInfo *job_info;
 
 		job_info = pixbuf_cache->job_list + i;
-		if (job_info->surface)
+		if (job_info && job_info->surface)
 			ev_document_misc_invert_surface (job_info->surface);
 	}
 }



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