X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fvar-type-dialog.c;h=ea3d2e098a23c5eb464fea1ab596e6c09e4460cc;hb=2d9ee2dd5f5fbaeda0caf5a19ad4f018f4b22bc3;hp=fb9fc6d9f143a561be032e00fbc254cc8d88202c;hpb=e5c4ada5c7675c8a54edf71c1a89fa88e1762a6f;p=pspp-builds.git diff --git a/src/ui/gui/var-type-dialog.c b/src/ui/gui/var-type-dialog.c index fb9fc6d9..ea3d2e09 100644 --- a/src/ui/gui/var-type-dialog.c +++ b/src/ui/gui/var-type-dialog.c @@ -807,14 +807,16 @@ on_var_type_ok_clicked (GtkWidget *w, gpointer data) break; case BUTTON_DATE: case BUTTON_CUSTOM: - g_assert (fmt_check_output (&dialog->fmt_l)); - result = memcpy (&spec, &dialog->fmt_l, sizeof (struct fmt_spec)); + if (! fmt_check_output (&dialog->fmt_l)) + g_critical ("Invalid variable format"); + else + result = memcpy (&spec, &dialog->fmt_l, sizeof (struct fmt_spec)); break; case BUTTON_DOLLAR: result = make_output_format_try (&spec, FMT_DOLLAR, width, decimals); break; default: - g_print ("Unknown variable type: %d\n", dialog->active_button) ; + g_critical ("Unknown variable type: %d", dialog->active_button) ; result = false; break; }