From 5c6e86d036ccb49f6487f8a10cb4586cb4fc4c23 Mon Sep 17 00:00:00 2001 From: Friedrich Beckmann Date: Sat, 27 Jun 2015 12:05:50 +0200 Subject: [PATCH] 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 --- src/ui/gui/psppire-output-view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++) -- 2.30.2