Don't render if the new surface passed to zathura_page_widget_update_surface is NULL.

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

Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
Marwan Tanager 2013-03-24 07:47:10 +02:00 committed by Sebastian Ramacher
parent 9c1503809a
commit e7cbd25be0

View file

@ -498,8 +498,10 @@ zathura_page_widget_update_surface(ZathuraPage* widget, cairo_surface_t* surface
priv->surface = surface;
mutex_unlock(&(priv->lock));
/* force a redraw here */
if (priv->surface != NULL) {
zathura_page_widget_redraw_canvas(widget);
}
}
static void
zathura_page_widget_size_allocate(GtkWidget* widget, GdkRectangle* allocation)