aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/keyvalues.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-04 03:21:20 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-04 03:21:20 +0100
commit07dfc69252f520bb5ed8ce92e55da4a8cf985bff (patch)
treee09753364c3271b44591486d55253aa91a09544e /NorthstarDedicatedTest/keyvalues.cpp
parent9f0288d744cd8dbd9b4213bd7a1a73a0c822b5a6 (diff)
downloadNorthstarLauncher-07dfc69252f520bb5ed8ce92e55da4a8cf985bff.tar.gz
NorthstarLauncher-07dfc69252f520bb5ed8ce92e55da4a8cf985bff.zip
random commit before reworking a large part of launcher code
Diffstat (limited to 'NorthstarDedicatedTest/keyvalues.cpp')
-rw-r--r--NorthstarDedicatedTest/keyvalues.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/NorthstarDedicatedTest/keyvalues.cpp b/NorthstarDedicatedTest/keyvalues.cpp
index 6ddb9d99..3d527e62 100644
--- a/NorthstarDedicatedTest/keyvalues.cpp
+++ b/NorthstarDedicatedTest/keyvalues.cpp
@@ -82,6 +82,13 @@ void ModManager::TryBuildKeyValues(const char* filename)
// load original file, so we can parse out the name of the root obj (e.g. WeaponData for weapons)
std::string originalFile = ReadVPKOriginalFile(filename);
+
+ if (!originalFile.length())
+ {
+ spdlog::warn("Tried to patch kv {} but no base kv was found!", ogFilePath);
+ return;
+ }
+
char rootName[64];
memset(rootName, 0, sizeof(rootName));