diff options
Diffstat (limited to 'cpputil/dummy_io.cc')
-rw-r--r-- | cpputil/dummy_io.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpputil/dummy_io.cc b/cpputil/dummy_io.cc index a8dacedbe..ef45db833 100644 --- a/cpputil/dummy_io.cc +++ b/cpputil/dummy_io.cc @@ -19,6 +19,10 @@ extern const struct PRIOMethods DummyMethodsForward; ScopedPRFileDesc DummyIOLayerMethods::CreateFD(PRDescIdentity id, DummyIOLayerMethods *methods) { ScopedPRFileDesc fd(PR_CreateIOLayerStub(id, &DummyMethodsForward)); + assert(fd); + if (!fd) { + return nullptr; + } fd->secret = reinterpret_cast<PRFilePrivate *>(methods); return fd; } |