mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 06:20:41 +00:00
Check for null pointer before using db in change view.
This commit is contained in:
parent
071598bddd
commit
0695594f7a
@ -594,7 +594,7 @@ MsgAppCoreViewAllThreadMessages(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
return JS_FALSE;
|
||||
}
|
||||
|
||||
NS_RELEASE(db);
|
||||
NS_IF_RELEASE(db);
|
||||
}
|
||||
else {
|
||||
JS_ReportError(cx, "Function ViewAllThreadMessages requires 1 parameter");
|
||||
|
@ -174,7 +174,7 @@ static nsresult ConvertDOMListToResourceArray(nsIDOMNodeList *nodeList, nsISuppo
|
||||
|
||||
static nsresult AddView(nsIRDFCompositeDataSource *database, nsIMessageView **messageView)
|
||||
{
|
||||
if(!messageView)
|
||||
if(!messageView || !database)
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
|
||||
nsIRDFService* gRDFService = nsnull;
|
||||
|
Loading…
x
Reference in New Issue
Block a user