If we don't intersect, the area is invalid or of size 0. --- gtk/spice-widget.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c index 0ab00fe..6b4ae96 100644 --- a/gtk/spice-widget.c +++ b/gtk/spice-widget.c @@ -878,7 +878,8 @@ static gboolean draw_event(GtkWidget *widget, cairo_t *cr) SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); g_return_val_if_fail(d != NULL, false); - if (d->mark == 0 || d->data == NULL) + if (d->mark == 0 || d->data == NULL || + d->area.width == 0 || d->area.height == 0) return false; g_return_val_if_fail(d->ximage != NULL, false); @@ -894,7 +895,8 @@ static gboolean expose_event(GtkWidget *widget, GdkEventExpose *expose) SpiceDisplayPrivate *d = SPICE_DISPLAY_GET_PRIVATE(display); g_return_val_if_fail(d != NULL, false); - if (d->mark == 0 || d->data == NULL) + if (d->mark == 0 || d->data == NULL || + d->area.width == 0 || d->area.height == 0) return false; g_return_val_if_fail(d->ximage != NULL, false); -- 1.7.10.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel