From 70ffe6ef157f696d304e5782d4080c2ef6453974 Mon Sep 17 00:00:00 2001 From: Steve Fink Date: Tue, 30 Nov 2021 15:51:27 +0000 Subject: [PATCH] Bug 1743441 - Missing nullptr check in TypedArray_base::fromObject r=jonco Differential Revision: https://phabricator.services.mozilla.com/D132416 --- js/src/vm/TypedArrayObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/vm/TypedArrayObject.cpp b/js/src/vm/TypedArrayObject.cpp index c9d2ecca2156..503f92706a5b 100644 --- a/js/src/vm/TypedArrayObject.cpp +++ b/js/src/vm/TypedArrayObject.cpp @@ -2819,7 +2819,7 @@ bool JS::ArrayBufferOrView::isDetached() const { } JS::TypedArray_base JS::TypedArray_base::fromObject(JSObject* unwrapped) { - if (unwrapped->is()) { + if (unwrapped && unwrapped->is()) { return TypedArray_base(unwrapped); } return TypedArray_base(nullptr);