From dfdb93cc4a4c112b9ae80817f6aca2fcc0d2e3e8 Mon Sep 17 00:00:00 2001
From: Moritz Maxeiner <mm@ucw.sh>
Date: Tue, 23 Jul 2019 15:34:42 +0200
Subject: [PATCH] Stop crashing if windows registry querying fails

---
 SrcBehaviorLoader/PluginLoader.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/SrcBehaviorLoader/PluginLoader.cpp b/SrcBehaviorLoader/PluginLoader.cpp
index 9af9875..59a8673 100644
--- a/SrcBehaviorLoader/PluginLoader.cpp
+++ b/SrcBehaviorLoader/PluginLoader.cpp
@@ -76,11 +76,13 @@ std::vector<std::string> QueryKey(HKEY hKey, std::string path)
                 {
                     qWarning() << "Error opening registry path " << path.c_str(); 
                     regKey.Close();
+                    continue;
                 }
                 if( ERROR_SUCCESS != regKey.QueryStringValue(achValue,szBuffer,&dwBufferSize))
                 {
                     qWarning() << "Error opening registry value " << achValue;
                     regKey.Close();
+                    continue;
                 }
 
                 std::string fp = szBuffer;
-- 
GitLab