зеркало из https://github.com/mozilla/pjs.git
Bug 591014: Null-check mImage in imgRequestProxy::GetStaticRequest. r=joe a=blocking-beta5
This commit is contained in:
Родитель
3f8fe94997
Коммит
3a679de655
|
@ -727,7 +727,7 @@ imgRequestProxy::GetStaticRequest(imgIRequest** aReturn)
|
||||||
*aReturn = nsnull;
|
*aReturn = nsnull;
|
||||||
|
|
||||||
PRBool animated;
|
PRBool animated;
|
||||||
if (NS_SUCCEEDED(mImage->GetAnimated(&animated)) && !animated) {
|
if (!mImage || (NS_SUCCEEDED(mImage->GetAnimated(&animated)) && !animated)) {
|
||||||
// Early exit - we're not animated, so we don't have to do anything.
|
// Early exit - we're not animated, so we don't have to do anything.
|
||||||
NS_ADDREF(*aReturn = this);
|
NS_ADDREF(*aReturn = this);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
@ -795,7 +795,7 @@ void imgRequestProxy::SyncNotifyListener()
|
||||||
void
|
void
|
||||||
imgRequestProxy::SetImage(Image* aImage)
|
imgRequestProxy::SetImage(Image* aImage)
|
||||||
{
|
{
|
||||||
NS_ABORT_IF_FALSE(!mImage, "Setting null image");
|
NS_ABORT_IF_FALSE(aImage, "Setting null image");
|
||||||
NS_ABORT_IF_FALSE(!mImage, "Setting image when we already have one");
|
NS_ABORT_IF_FALSE(!mImage, "Setting image when we already have one");
|
||||||
|
|
||||||
mImage = aImage;
|
mImage = aImage;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче