Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/dll/v1/Funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,12 @@ bool v1::GameStates::Add(RED4ext::v1::PluginHandle aHandle, RED4ext::EGameStateT

bool v1::Scripts::Add(RED4ext::v1::PluginHandle aHandle, const wchar_t* aPath)
{
if (!aPath)
{
spdlog::warn("Plugin with handle {} called Scripts::Add with a NULL path", fmt::ptr(aHandle));
return false;
}

auto app = App::Get();
if (!app)
{
Expand All @@ -140,6 +146,12 @@ bool v1::Scripts::Add(RED4ext::v1::PluginHandle aHandle, const wchar_t* aPath)

bool v1::Scripts::RegisterNeverRefType(const char* aType)
{
if (!aType)
{
spdlog::warn("Scripts::RegisterNeverRefType called with a NULL type name");
return false;
}

auto app = App::Get();
if (!app)
{
Expand All @@ -153,6 +165,12 @@ bool v1::Scripts::RegisterNeverRefType(const char* aType)

bool v1::Scripts::RegisterMixedRefType(const char* aType)
{
if (!aType)
{
spdlog::warn("Scripts::RegisterMixedRefType called with a NULL type name");
return false;
}

auto app = App::Get();
if (!app)
{
Expand Down