From: Friedrich Beckmann Date: Sat, 27 Jun 2015 10:05:50 +0000 (+0200) Subject: psppire-output-view.c: added check for view->xr - fixes bug #45421 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c6e86d036ccb49f6487f8a10cb4586cb4fc4c23;p=pspp psppire-output-view.c: added check for view->xr - fixes bug #45421 The output windows crashed when an empty syntax window is executed. The rerender function got called without a valid view->xr (=NULL). I added a check for this condition and create a new view->xr as it is done in the psppire_output_view_put function. This fixes bug #45421: Crash when trying to run empty syntax --- diff --git a/src/ui/gui/psppire-output-view.c b/src/ui/gui/psppire-output-view.c index 9a4be6810e..dd5aadb9a0 100644 --- a/src/ui/gui/psppire-output-view.c +++ b/src/ui/gui/psppire-output-view.c @@ -187,7 +187,8 @@ rerender (struct psppire_output_view *view) return; cr = gdk_cairo_create (gtk_widget_get_window (GTK_WIDGET (view->output))); - + if (view->xr == NULL) + create_xr (view); view->y = 0; view->max_width = 0; for (item = view->items; item < &view->items[view->n_items]; item++)