зеркало из https://github.com/mozilla/pjs.git
Bug 513544 - Crash [@nsImageFrame::DisplayAltFeedback] - r=bzbarsky
This commit is contained in:
Родитель
dc6b694876
Коммит
2e5e064117
|
@ -985,9 +985,6 @@ nsImageFrame::DisplayAltFeedback(nsIRenderingContext& aRenderingContext,
|
|||
// We should definitely have a gIconLoad here.
|
||||
NS_ABORT_IF_FALSE(gIconLoad, "How did we succeed in Init then?");
|
||||
|
||||
// We always call this function with an image
|
||||
NS_ABORT_IF_FALSE(aRequest, "Calling DisplayAltFeedback without an image");
|
||||
|
||||
// Calculate the inner area
|
||||
nsRect inner = GetInnerArea() + aPt;
|
||||
|
||||
|
@ -1033,15 +1030,16 @@ nsImageFrame::DisplayAltFeedback(nsIRenderingContext& aRenderingContext,
|
|||
// If we weren't previously displaying an icon, register ourselves
|
||||
// as an observer for load and animation updates and flag that we're
|
||||
// doing so now.
|
||||
if (!mDisplayingIcon) {
|
||||
if (aRequest && !mDisplayingIcon) {
|
||||
gIconLoad->AddIconObserver(this);
|
||||
mDisplayingIcon = PR_TRUE;
|
||||
}
|
||||
|
||||
|
||||
// If the image in question is loaded and decoded, draw it
|
||||
PRUint32 imageStatus;
|
||||
aRequest->GetImageStatus(&imageStatus);
|
||||
PRUint32 imageStatus = 0;
|
||||
if (aRequest)
|
||||
aRequest->GetImageStatus(&imageStatus);
|
||||
if (imageStatus & imgIRequest::STATUS_FRAME_COMPLETE) {
|
||||
nsCOMPtr<imgIContainer> imgCon;
|
||||
aRequest->GetImage(getter_AddRefs(imgCon));
|
||||
|
|
Загрузка…
Ссылка в новой задаче