From fa1fa23c55cc4aaed9ad88fc1febbc0725e789c2 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Mon, 19 Sep 2016 06:34:37 +0200 Subject: [PATCH] Fix crash in NodeUtility::CollectNodes fixes #12741 --- lib/cli/nodeutility.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/cli/nodeutility.cpp b/lib/cli/nodeutility.cpp index a8827d430..9a05a675e 100644 --- a/lib/cli/nodeutility.cpp +++ b/lib/cli/nodeutility.cpp @@ -242,7 +242,13 @@ Dictionary::Ptr NodeUtility::LoadNodeFile(const String& node_file) void NodeUtility::CollectNodes(const String& node_file, std::vector& nodes) { - Dictionary::Ptr node = LoadNodeFile(node_file); + Dictionary::Ptr node; + + try { + node = LoadNodeFile(node_file); + } catch (const std::exception&) { + return; + } if (!node) return;