/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2005, 2006, 2010, 2011 Free Software Foundation
+ Copyright (C) 2005, 2006, 2010, 2011, 2012 Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "data/settings.h"
#include "data/variable.h"
#include "libpspp/message.h"
-#include "ui/gui/helper.h"
+#include "ui/gui/builder-wrapper.h"
#include "ui/gui/var-type-dialog.h"
struct tgs
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;
}