src: add nullptr handling for NativeKeyObject

Fixes: https://github.com/nodejs/node/issues/56899
PR-URL: https://github.com/nodejs/node/pull/56900
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
This commit is contained in:
Burkov Egor authored and RafaelGSS committed 2025-04-16 03:29:19 -03:00
1 parent 2244a2776a
commit 0a8e474bdc
1 file changed
+1
+1
View File
@@ -1066,6 +1066,7 @@ void NativeKeyObject::New(const FunctionCallbackInfo<Value>& args) {
CHECK_EQ(args.Length(), 1);
CHECK(args[0]->IsObject());
KeyObjectHandle* handle = Unwrap<KeyObjectHandle>(args[0].As<Object>());
CHECK_NOT_NULL(handle);
new NativeKeyObject(env, args.This(), handle->Data());
}