]> www.fi.muni.cz Git - evince.git/commitdiff
[libview] Do nothing if don't have a job_list yet
authorCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 2 Jun 2010 09:47:18 +0000 (11:47 +0200)
committerCarlos Garcia Campos <carlosgc@gnome.org>
Wed, 2 Jun 2010 09:48:52 +0000 (11:48 +0200)
The job_list isn't created in the init anymore, so it might be NULL.

libview/ev-pixbuf-cache.c

index 1412236915185a374c8c06fafd07d187ce93ab32..42dd1def5349ccfb22056b5e35140583232212de 100644 (file)
@@ -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;