Bug 374937, Crashes [@ nsTypedSelection::GetFrameSelection], r+sr=roc
authorOlli.Pettay@helsinki.fi
Thu, 22 Mar 2007 17:06:38 -0700
changeset 17 857a110b5916a20234ad6a985486c4e98d332bcd
parent 16 f880729f348708feb6f1788ec14d53d07dc2b829
child 18 438e6c07c05b8314b444147f5163be800b95b67d
push idunknown
push userunknown
push dateunknown
bugs374937
milestone1.9a3pre
Bug 374937, Crashes [@ nsTypedSelection::GetFrameSelection], r+sr=roc
layout/generic/nsSelection.cpp
--- a/layout/generic/nsSelection.cpp
+++ b/layout/generic/nsSelection.cpp
@@ -5282,17 +5282,17 @@ nsTypedSelection::GetCachedFrameOffset(n
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsTypedSelection::GetFrameSelection(nsFrameSelection **aFrameSelection) {
   NS_ENSURE_ARG_POINTER(aFrameSelection);
   *aFrameSelection = mFrameSelection;
-  NS_ADDREF(*aFrameSelection);
+  NS_IF_ADDREF(*aFrameSelection);
   return NS_OK;
 }
 
 nsresult
 nsTypedSelection::StartAutoScrollTimer(nsPresContext *aPresContext,
                                        nsIView *aView,
                                        nsPoint& aPoint,
                                        PRUint32 aDelay)