I don't see any reason for queueing a redraw if the new surface is NULL.

---
 page-widget.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/page-widget.c b/page-widget.c
index 42ce131..80b1ef0 100644
--- a/page-widget.c
+++ b/page-widget.c
@@ -498,7 +498,9 @@ zathura_page_widget_update_surface(ZathuraPage* widget, 
cairo_surface_t* surface
   priv->surface = surface;
   mutex_unlock(&(priv->lock));
   /* force a redraw here */
-  zathura_page_widget_redraw_canvas(widget);
+  if (priv->surface != NULL) {
+    zathura_page_widget_redraw_canvas(widget);
+  }
 }
 
 cairo_surface_t*
-- 
1.7.10.4

_______________________________________________
zathura mailing list
zathura@lists.pwmt.org
http://lists.pwmt.org/mailman/listinfo/zathura

Reply via email to