gnucash unstable: Bug 787095 - Gnucash Crashes when opening old XML file

John Ralls jralls at code.gnucash.org
Thu Feb 22 18:59:53 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/128fce3e (commit)
	from  https://github.com/Gnucash/gnucash/commit/bab3bc7e (commit)



commit 128fce3ed815db40bf70c67e622c32511e223f99
Author: Andreas Müller <andreas at stapelspeicher.org>
Date:   Thu Feb 22 15:59:12 2018 -0800

    Bug 787095 - Gnucash Crashes when opening old XML file

diff --git a/libgnucash/engine/kvp-frame.cpp b/libgnucash/engine/kvp-frame.cpp
index 3d09e2f..b320814 100644
--- a/libgnucash/engine/kvp-frame.cpp
+++ b/libgnucash/engine/kvp-frame.cpp
@@ -121,6 +121,8 @@ KvpFrame::set_impl (std::string const & key, KvpValue * value) noexcept
 KvpValue *
 KvpFrameImpl::set (Path path, KvpValue* value) noexcept
 {
+    if (path.empty())
+        return nullptr;
     auto key = path.back ();
     path.pop_back ();
     auto target = get_child_frame_or_nullptr (path);



Summary of changes:
 libgnucash/engine/kvp-frame.cpp | 2 ++
 1 file changed, 2 insertions(+)



More information about the gnucash-changes mailing list