fix pack segfault

This commit is contained in:
briaguya
2024-06-01 22:47:56 -06:00
committed by Lywx
parent 3b64734201
commit beda6c05a3
+1 -1
View File
@@ -20,7 +20,7 @@ SWrapper::SWrapper(const std::string& path) {
}
bool SWrapper::CreateFile(const std::string& path, std::vector<char> data) {
if(Companion::Instance->IsDebug()){
if(Companion::Instance != nullptr && Companion::Instance->IsDebug()){
SPDLOG_INFO("Creating debug file: debug/{}", path);
std::string dpath = "debug/" + path;
if(!fs::exists(fs::path(dpath).parent_path())){