src: add nullptr handling for `NativeKeyObject` · nodejs/node@fbb32e0

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit fbb32e0

wooffietargos

authored and

committed

src: add nullptr handling for NativeKeyObject

Fixes: #56899 PR-URL: #56900 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com>

1 parent de77371 commit fbb32e0

File tree

1 file changed

+

1

-

0

lines changed

1 file changed

+

1

-

0

lines changed

Lines changed: 1 addition & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -1045,6 +1045,7 @@ void NativeKeyObject::New(const FunctionCallbackInfo<Value>& args) {

10451045

CHECK_EQ(args.Length(), 1);

10461046

CHECK(args[0]->IsObject());

10471047

KeyObjectHandle* handle = Unwrap<KeyObjectHandle>(args[0].As<Object>());

1048+

CHECK_NOT_NULL(handle);

10481049

new NativeKeyObject(env, args.This(), handle->Data());

10491050

}

10501051

0 commit comments

Comments

 (0)