Skip to content

Commit

Permalink
chore(shared): Print message when MValueConst contains a nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
xLuxy committed Mar 26, 2024
1 parent b6a8370 commit 2544f42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions shared/src/helpers/Convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@ v8::Local<v8::Value> js::MValueToJS(alt::MValueConst val)
v8::Local<v8::Context> ctx = isolate->GetEnteredOrMicrotaskContext();
js::IResource* resource = js::IResource::GetFromContext(ctx);

if (!val)
{
js::Throw("js::MValueToJS: val is nullptr - please forward to module maintainer");
return v8::Undefined(isolate);
}

switch(val->GetType())
{
case alt::IMValue::Type::NONE: return v8::Undefined(isolate);
Expand Down

0 comments on commit 2544f42

Please sign in to comment.