check in for andreas, it now checks to make sure that the image or lowimage is not

null before getting the width and height
b=36902, a=waterson
This commit is contained in:
rods%netscape.com 2000-07-20 14:50:17 +00:00
Родитель 08e968606d
Коммит 8c110fcbfd
2 изменённых файлов: 14 добавлений и 4 удалений

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

@ -603,8 +603,13 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
if (mImageLoader.GetLoadImageFailed()) {
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
if (image != nsnull) {
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
} else if (lowImage != nsnull) {
inner.width = NSIntPixelsToTwips(lowImage->GetWidth(), p2t);
inner.height = NSIntPixelsToTwips(lowImage->GetHeight(), p2t);
}
}
if (lowImage != nsnull && lowSrcLinesLoaded > 0) {

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

@ -603,8 +603,13 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
if (mImageLoader.GetLoadImageFailed()) {
float p2t;
aPresContext->GetScaledPixelsToTwips(&p2t);
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
if (image != nsnull) {
inner.width = NSIntPixelsToTwips(image->GetWidth(), p2t);
inner.height = NSIntPixelsToTwips(image->GetHeight(), p2t);
} else if (lowImage != nsnull) {
inner.width = NSIntPixelsToTwips(lowImage->GetWidth(), p2t);
inner.height = NSIntPixelsToTwips(lowImage->GetHeight(), p2t);
}
}
if (lowImage != nsnull && lowSrcLinesLoaded > 0) {