]> www.fi.muni.cz Git - evince.git/commitdiff
unref the pixbuf iff it exists.
authorJonathan Blandford <jrb@redhat.com>
Thu, 30 Jun 2005 05:50:58 +0000 (05:50 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Thu, 30 Jun 2005 05:50:58 +0000 (05:50 +0000)
Thu Jun 30 01:50:14 2005  Jonathan Blandford  <jrb@redhat.com>

        * shell/ev-pixbuf-cache.c (clear_selection_if_needed): unref the
        pixbuf iff it exists.

ChangeLog
shell/ev-pixbuf-cache.c

index 5ef20ffb9bf22c0c614b0ed7d208b9bb99184b70..dd0eeb5d5b9a1a832c1e957c45bc10801d9dc6e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Jun 30 01:50:14 2005  Jonathan Blandford  <jrb@redhat.com>
+
+       * shell/ev-pixbuf-cache.c (clear_selection_if_needed): unref the
+       pixbuf iff it exists.
+
 Thu Jun 30 01:43:00 2005  Jonathan Blandford  <jrb@redhat.com>
 
        * shell/*:
index 6c5618da3daae4f24fca456eff70b2f24bda016a..58ba3bff51be64306214b0576282e115caf3d8b4 100644 (file)
@@ -653,7 +653,8 @@ clear_selection_if_needed (EvPixbufCache *pixbuf_cache,
                           gfloat         scale)
 {
        if (new_selection_pixbuf_needed (pixbuf_cache, job_info, page, scale)) {
-               g_object_unref (job_info->selection);
+               if (job_info->selection)
+                       g_object_unref (job_info->selection);
                job_info->selection = NULL;
                job_info->selection_points.x1 = -1;
        }