X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fui%2Fgui%2Fpsppire-variable.c;h=49dd84b6566fb56b4d2f5246873cbb2c18ca512c;hb=b1352e0bd746fd3ca70dafb1c1715deb70234a41;hp=7d23f48bfbcaf6bea6dbdc3e1c96ac8793acb101;hpb=a19b858e0ac3c69e4a28c0ca6d8674427268a863;p=pspp-builds.git diff --git a/src/ui/gui/psppire-variable.c b/src/ui/gui/psppire-variable.c index 7d23f48b..49dd84b6 100644 --- a/src/ui/gui/psppire-variable.c +++ b/src/ui/gui/psppire-variable.c @@ -87,11 +87,13 @@ psppire_variable_set_label(struct PsppireVariable *pv, const gchar *label) gboolean psppire_variable_set_decimals(struct PsppireVariable *pv, gint decimals) { + struct fmt_spec fmt; + g_return_val_if_fail(pv, FALSE); g_return_val_if_fail(pv->dict, FALSE); g_return_val_if_fail(pv->v, FALSE); - struct fmt_spec fmt = pv->v->write; + fmt = pv->v->write; fmt.d = decimals; @@ -103,11 +105,12 @@ psppire_variable_set_decimals(struct PsppireVariable *pv, gint decimals) gboolean psppire_variable_set_width(struct PsppireVariable *pv, gint width) { + struct fmt_spec fmt ; g_return_val_if_fail(pv, FALSE); g_return_val_if_fail(pv->dict, FALSE); g_return_val_if_fail(pv->v, FALSE); - struct fmt_spec fmt = pv->v->write; + fmt = pv->v->write; fmt.w = width;