Bug 1232231 - BorrowDrawTarget can return nullptr - be ready for it. r=nical

This commit is contained in:
Milan Sreckovic
2016-01-04 09:50:00 -05:00
parent 1b2d06e8a5
commit 459a567a61
2 changed files with 14 additions and 3 deletions

View File

@@ -40,7 +40,12 @@ TextureWrapperImage::GetAsSourceSurface()
return nullptr;
}
return mTextureClient->BorrowDrawTarget()->Snapshot();
RefPtr<DrawTarget> dt = mTextureClient->BorrowDrawTarget();
if (!dt) {
return nullptr;
}
return dt->Snapshot();
}
TextureClient*