diff --git a/xpcom/glue/nsVoidArray.h b/xpcom/glue/nsVoidArray.h index 2559baa3e3bc..95d17b11e9e3 100644 --- a/xpcom/glue/nsVoidArray.h +++ b/xpcom/glue/nsVoidArray.h @@ -83,7 +83,7 @@ public: { return nsnull; } - return mImpl->mArray[aIndex]; + return mImpl ? mImpl->mArray[aIndex] : nsnull; } // bounds-checked version @@ -93,7 +93,7 @@ public: { return nsnull; } - return mImpl->mArray[aIndex]; + return mImpl ? mImpl->mArray[aIndex] : nsnull; } void* operator[](PRInt32 aIndex) const { return ElementAt(aIndex); }