From 8733d06dc3c7f0316efe9e198528552fc0ec7f5b Mon Sep 17 00:00:00 2001 From: Alejandro Asenjo Nitti <96613413+sonicdcer@users.noreply.github.com> Date: Mon, 29 Jul 2024 03:55:45 -0300 Subject: Fix segfault (#146) --- src/Companion.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Companion.cpp') diff --git a/src/Companion.cpp b/src/Companion.cpp index 2c2655b..5615cbe 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -1475,6 +1475,10 @@ std::optional Companion::AddAsset(YAML::Node asset) { auto result = this->RegisterAsset(output, asset); + if(!gCurrentVirtualPath.empty()) { + asset["path"] = gCurrentVirtualPath; + } + if(result.has_value()){ asset["vpath"] = std::get<0>(result.value()); -- cgit v1.2.3