Bug 1360613 - Don't call BorrowDrawTarget on a null texture. r=ethlin

MozReview-Commit-ID: EtBMTwA5mcB

--HG--
extra : rebase_source : 87de2f03dba406974fc8c9037e1ddf7af0e25e49
This commit is contained in:
Kartikaya Gupta 2017-05-02 22:22:47 -04:00
parent 4cc4fce760
commit aaee175243

View File

@ -49,7 +49,10 @@ public:
already_AddRefed<gfx::DrawTarget> GetDrawTarget()
{
RefPtr<gfx::DrawTarget> target = mTexture->BorrowDrawTarget();
RefPtr<gfx::DrawTarget> target;
if (mTexture) {
target = mTexture->BorrowDrawTarget();
}
return target.forget();
}