Bug 1076910 - Add some error checks to gfxUtils::EncodeSourceSurface. r=Bas

This commit is contained in:
Jonathan Watt 2014-10-31 11:16:45 +00:00
parent 07d0853822
commit 6ec5c9c594

View File

@ -1184,6 +1184,8 @@ gfxUtils::EncodeSourceSurface(SourceSurface* aSurface,
}
}
}
NS_ENSURE_SUCCESS(rv, rv);
NS_ENSURE_TRUE(!imgData.empty(), NS_ERROR_FAILURE);
if (aBinaryOrData == eBinaryEncode) {
if (aFile) {