mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Make gfxImageSurface clear allocated surface data. r=vlad
This commit is contained in:
parent
d7840a8c41
commit
a8e32416ef
@ -51,7 +51,7 @@ gfxImageSurface::gfxImageSurface(const gfxIntSize& size, gfxImageFormat format)
|
|||||||
|
|
||||||
// if we have a zero-sized surface, just set mData to nsnull
|
// if we have a zero-sized surface, just set mData to nsnull
|
||||||
if (mSize.height * mStride > 0) {
|
if (mSize.height * mStride > 0) {
|
||||||
mData = (unsigned char *) malloc(mSize.height * mStride);
|
mData = (unsigned char *) calloc(mSize.height, mStride);
|
||||||
if (!mData)
|
if (!mData)
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user