From 2e0a8e2b0419eef03d08b6d460d0458861b5d20d Mon Sep 17 00:00:00 2001 From: "dcone%netscape.com" Date: Wed, 14 Feb 2001 02:57:07 +0000 Subject: [PATCH] Added a refcount to the nsDeviceContext. sr=attinasi r=kmcclusk git-svn-id: svn://10.0.0.236/trunk@86968 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/gfx/src/mac/nsDeviceContextMac.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/gfx/src/mac/nsDeviceContextMac.cpp b/mozilla/gfx/src/mac/nsDeviceContextMac.cpp index 0465a864b9d..4368cb9a7bf 100644 --- a/mozilla/gfx/src/mac/nsDeviceContextMac.cpp +++ b/mozilla/gfx/src/mac/nsDeviceContextMac.cpp @@ -677,6 +677,11 @@ NS_IMETHODIMP nsDeviceContextMac::GetDeviceContextFor(nsIDeviceContextSpec *aDev nsDeviceContextMac *macDC; aContext = new nsDeviceContextMac(); + if(nsnull == aContext){ + return NS_ERROR_OUT_OF_MEMORY; + } + NS_ADDREF(aContext); + macDC = (nsDeviceContextMac*)aContext; macDC->mSpec = aDevice; NS_ADDREF(aDevice);