From edb2ef293efef5bec4ef6eec7838d5a9d3d81134 Mon Sep 17 00:00:00 2001 From: Phil Longstaff Date: Sun, 26 Nov 2006 04:06:57 +0000 Subject: [PATCH] Fix bug where kvp_frame_add_numeric() (and other routines) wouldn't create the kvp path if it didn't exist. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gda-dev@15143 57a11ea4-9604-0410-9ed3-97b8803252fd --- lib/libqof/qof/kvp_frame.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/libqof/qof/kvp_frame.c b/lib/libqof/qof/kvp_frame.c index 5d3ae57c29..f3a4759480 100644 --- a/lib/libqof/qof/kvp_frame.c +++ b/lib/libqof/qof/kvp_frame.c @@ -512,6 +512,7 @@ kvp_frame_add_value_nc(KvpFrame * frame, const char * path, KvpValue *value) { char *key = NULL; KvpValue *oldvalue; + KvpFrame* orig_frame = frame; frame = (KvpFrame *) get_trailer_or_null (frame, path, &key); oldvalue = kvp_frame_get_slot (frame, key); @@ -544,6 +545,7 @@ kvp_frame_add_value_nc(KvpFrame * frame, const char * path, KvpValue *value) /* Hmm, if we are here, the path doesn't exist. We need to * create the path, add the value to it. */ + frame = orig_frame; frame = kvp_frame_set_value_nc (frame, path, value); LEAVE ("new frame=%s", kvp_frame_to_string(frame)); return frame;