[evince] EvPixbufCache: Handle backends that don't render a selection
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] EvPixbufCache: Handle backends that don't render a selection
- Date: Wed, 23 Jul 2014 13:33:39 +0000 (UTC)
commit c5a338c00253aeb88901c574ea150b3bd83634e7
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Mar 3 12:44:44 2014 -0500
EvPixbufCache: Handle backends that don't render a selection
Handle the case where ev_selection_render_selection() doesn't actually
render a surface - this happens when a backend doesn't implement
render_selection().
https://bugzilla.gnome.org/show_bug.cgi?id=723431
libview/ev-pixbuf-cache.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 0f4403e..e9019bd 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -296,7 +296,8 @@ copy_job_to_job_info (EvJobRender *job_render,
job_info->selection_points = job_render->selection_points;
job_info->selection = cairo_surface_reference (job_render->selection);
- set_device_scale_on_surface (job_info->selection, job_info->device_scale);
+ if (job_info->selection)
+ set_device_scale_on_surface (job_info->selection, job_info->device_scale);
job_info->selection_scale = job_render->scale * job_info->device_scale;
g_assert (job_info->selection_points.x1 >= 0);
@@ -1096,7 +1097,8 @@ ev_pixbuf_cache_get_selection_surface (EvPixbufCache *pixbuf_cache,
old_points,
job_info->selection_style,
&text, &base);
- set_device_scale_on_surface (job_info->selection, job_info->device_scale);
+ if (job_info->selection)
+ set_device_scale_on_surface (job_info->selection, job_info->device_scale);
job_info->selection_points = job_info->target_points;
job_info->selection_scale = scale * job_info->device_scale;
g_object_unref (rc);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]