From 128fce3ed815db40bf70c67e622c32511e223f99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Thu, 22 Feb 2018 15:59:12 -0800 Subject: [PATCH] Bug 787095 - Gnucash Crashes when opening old XML file --- libgnucash/engine/kvp-frame.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgnucash/engine/kvp-frame.cpp b/libgnucash/engine/kvp-frame.cpp index 3d09e2fe56..b32081468e 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);