diff --git a/dom/webgpu/Device.cpp b/dom/webgpu/Device.cpp index 311ff2a47805..f274757f9765 100644 --- a/dom/webgpu/Device.cpp +++ b/dom/webgpu/Device.cpp @@ -24,7 +24,8 @@ Device::Device(Adapter* const aParent, RawId aId) } Device::~Device() { - if (mBridge->IsOpen()) { + //TODO: figure out when `mBridge` could be `nullptr` + if (mBridge && mBridge->IsOpen()) { mBridge->SendDeviceDestroy(mId); } }