Put in an AddRef for the newly created DeviceContext for printing. r=kmcclusk sr=attinasi

This commit is contained in:
dcone%netscape.com 2001-02-13 15:03:50 +00:00
Родитель 34cf943a88
Коммит 216126f18c
1 изменённых файлов: 5 добавлений и 0 удалений

Просмотреть файл

@ -805,6 +805,11 @@ NS_IMETHODIMP nsDeviceContextWin :: GetDeviceContextFor(nsIDeviceContextSpec *aD
//then QI for the real object rather than casting... MMP
aContext = new nsDeviceContextWin();
if(nsnull != aContext){
NS_ADDREF(aContext);
} else {
return NS_ERROR_OUT_OF_MEMORY;
}
((nsDeviceContextWin *)aContext)->mSpec = aDevice;
NS_ADDREF(aDevice);