]> www.fi.muni.cz Git - evince.git/commitdiff
Do not crash when thumbnail failed to render in PS backend. Fixes bug
authorCarlos Garcia Campos <carlosgc@gnome.org>
Tue, 1 Apr 2008 12:37:38 +0000 (12:37 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Tue, 1 Apr 2008 12:37:38 +0000 (12:37 +0000)
2008-04-01  Carlos Garcia Campos  <carlosgc@gnome.org>

* backend/ps/ev-spectre.c: (ps_document_thumbnails_get_thumbnail):

Do not crash when thumbnail failed to render in PS backend. Fixes
bug #525015.

svn path=/trunk/; revision=2986

ChangeLog
backend/ps/ev-spectre.c

index 1cb15f4b845d65be8bf6003e4c9274ca5dc5d4a3..1c4e001ace73becfbdb99577fcbb020c5ea36ffc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-01  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * backend/ps/ev-spectre.c: (ps_document_thumbnails_get_thumbnail):
+
+       Do not crash when thumbnail failed to render in PS backend. Fixes
+       bug #525015.
+       
 2008-03-31  Carlos Garcia Campos  <carlosgc@gnome.org>
 
        * shell/ev-window.c: (window_open_file_copy_ready_cb),
index 7e8d27bb4e5f23e3131b529cadce09aa6828cc19..6fe58692e1630f03d9e7047aca10c11fe6588c9b 100644 (file)
@@ -351,6 +351,11 @@ ps_document_thumbnails_get_thumbnail (EvDocumentThumbnails *document_thumbnails,
        GdkPixbuf       *pixbuf = NULL;
 
        surface = ps_document_render (EV_DOCUMENT (ps), rc);
+       if (!surface) {
+               g_warning ("Error rendering thumbnail");
+               return NULL;
+       }
+               
        pixbuf = ev_document_misc_pixbuf_from_surface (surface);
        cairo_surface_destroy (surface);