summaryrefslogtreecommitdiff
path: root/libview/ev-pixbuf-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'libview/ev-pixbuf-cache.c')
-rw-r--r--libview/ev-pixbuf-cache.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 46031d7e..163267f6 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -72,7 +72,6 @@ struct _EvPixbufCacheClass
void (* job_finished) (EvPixbufCache *pixbuf_cache);
};
-
enum
{
JOB_FINISHED,
@@ -92,7 +91,6 @@ static gboolean new_selection_surface_needed(EvPixbufCache *pixbuf_cac
gint page,
gfloat scale);
-
/* These are used for iterating through the prev and next arrays */
#define FIRST_VISIBLE_PREV(pixbuf_cache) \
(MAX (0, pixbuf_cache->preload_cache_size - pixbuf_cache->start_page))
@@ -223,7 +221,6 @@ ev_pixbuf_cache_dispose (GObject *object)
G_OBJECT_CLASS (ev_pixbuf_cache_parent_class)->dispose (object);
}
-
EvPixbufCache *
ev_pixbuf_cache_new (GtkWidget *view,
EvDocumentModel *model,
@@ -327,6 +324,12 @@ job_finished_cb (EvJob *job,
job_info = find_job_cache (pixbuf_cache, job_render->page);
+ if (ev_job_is_failed (job)) {
+ job_info->job = NULL;
+ g_object_unref (job);
+ return;
+ }
+
copy_job_to_job_info (job_render, job_info, pixbuf_cache);
g_signal_emit (pixbuf_cache, signals[JOB_FINISHED], 0, job_info->region);
}
@@ -979,7 +982,6 @@ ev_pixbuf_cache_clear (EvPixbufCache *pixbuf_cache)
}
}
-
void
ev_pixbuf_cache_style_changed (EvPixbufCache *pixbuf_cache)
{
@@ -1259,7 +1261,6 @@ ev_pixbuf_cache_set_selection_list (EvPixbufCache *pixbuf_cache,
}
}
-
/* Returns what the pixbuf cache thinks is */
GList *
@@ -1350,4 +1351,3 @@ ev_pixbuf_cache_reload_page (EvPixbufCache *pixbuf_cache,
EV_JOB_PRIORITY_URGENT);
}
-