From 8ae879a305986bdcf50c7e407efe98f5a4c9adc8 Mon Sep 17 00:00:00 2001 From: "smfr%smfr.org" Date: Wed, 10 Aug 2005 22:15:30 +0000 Subject: [PATCH] Fix FindRow() to deal with null argument. --- camino/src/history/nsSimpleGlobalHistory.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/camino/src/history/nsSimpleGlobalHistory.cpp b/camino/src/history/nsSimpleGlobalHistory.cpp index cf941c252f6..ebf3a523128 100644 --- a/camino/src/history/nsSimpleGlobalHistory.cpp +++ b/camino/src/history/nsSimpleGlobalHistory.cpp @@ -2204,9 +2204,11 @@ nsSimpleGlobalHistory::FindRow(mdb_column aCol, if (!hasRow) return NS_ERROR_NOT_AVAILABLE; - *aResult = row; - (*aResult)->AddRef(); - + if (aResult) { + *aResult = row; + (*aResult)->AddRef(); + } + return NS_OK; }