X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dict.c;h=3722b2e1894a298179bfcd0546cb6d00a2d72ae4;hb=017ba229ee4570635c3cb07fa7189796fce15969;hp=cf66ca13c2820d6bf64d57a18bae52ddf4dd1a3d;hpb=9b94efd7513afdb12a6023024e00e50801532fee;p=pspp-builds.git diff --git a/src/ui/gui/psppire-dict.c b/src/ui/gui/psppire-dict.c index cf66ca13..3722b2e1 100644 --- a/src/ui/gui/psppire-dict.c +++ b/src/ui/gui/psppire-dict.c @@ -790,6 +790,10 @@ psppire_dict_rename_var (PsppireDict *dict, struct variable *v, if ( ! var_is_valid_name (name, false)) return FALSE; + /* Make sure no other variable has this name */ + if ( NULL != psppire_dict_lookup_var (dict, name)) + return FALSE; + dict_rename_var (dict->dict, v, name); return TRUE;