Check for null pointer before using db in change view.

This commit is contained in:
putterman%netscape.com 1999-04-24 20:34:51 +00:00
parent 071598bddd
commit 0695594f7a
2 changed files with 2 additions and 2 deletions

View File

@ -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");

View File

@ -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;