diff --git a/xpcom/glue/nsVoidArray.cpp b/xpcom/glue/nsVoidArray.cpp index a5c8442576e..bd7145ca72a 100644 --- a/xpcom/glue/nsVoidArray.cpp +++ b/xpcom/glue/nsVoidArray.cpp @@ -732,6 +732,11 @@ nsStringArray::~nsStringArray(void) nsStringArray& nsStringArray::operator=(const nsStringArray& other) { + if (this == &other) + { + return *this; + } + // Free our strings Clear(); @@ -985,6 +990,11 @@ nsCStringArray::~nsCStringArray(void) nsCStringArray& nsCStringArray::operator=(const nsCStringArray& other) { + if (this == &other) + { + return *this; + } + // Free our strings Clear();