[evince] [libview] Do nothing if don't have a job_list yet
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] [libview] Do nothing if don't have a job_list yet
- Date: Wed, 2 Jun 2010 09:49:11 +0000 (UTC)
commit c502f231711ff5c0c5f3c4fdd15e9570d96b23a8
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Wed Jun 2 11:47:18 2010 +0200
[libview] Do nothing if don't have a job_list yet
The job_list isn't created in the init anymore, so it might be NULL.
libview/ev-pixbuf-cache.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 1412236..42dd1de 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -869,6 +869,9 @@ ev_pixbuf_cache_clear (EvPixbufCache *pixbuf_cache)
{
int i;
+ if (!pixbuf_cache->job_list)
+ return;
+
for (i = 0; i < pixbuf_cache->preload_cache_size; i++) {
dispose_cache_job_info (pixbuf_cache->prev_job + i, pixbuf_cache);
dispose_cache_job_info (pixbuf_cache->next_job + i, pixbuf_cache);
@@ -885,6 +888,9 @@ ev_pixbuf_cache_style_changed (EvPixbufCache *pixbuf_cache)
{
gint i;
+ if (!pixbuf_cache->job_list)
+ return;
+
/* FIXME: doesn't update running jobs. */
for (i = 0; i < pixbuf_cache->preload_cache_size; i++) {
CacheJobInfo *job_info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]