mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 722444. Initialize mData for 0 sized surfaces. r=bgirard
This avoids an invalid free() during destruction found with the online canvas test suite. --HG-- extra : rebase_source : e1aeff36e557b045fbaff38d7b46fdf91956ae49
This commit is contained in:
parent
33ac1e18fe
commit
c6a61d7d9a
@ -795,6 +795,7 @@ DrawTargetCG::Init(CGContextRef cgContext, const IntSize &aSize)
|
||||
if (aSize.width == 0 || aSize.height == 0) {
|
||||
mColorSpace = NULL;
|
||||
mCg = NULL;
|
||||
mData = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -829,6 +830,7 @@ DrawTargetCG::Init(const IntSize &aSize, SurfaceFormat &)
|
||||
if (aSize.width == 0 || aSize.height == 0) {
|
||||
mColorSpace = NULL;
|
||||
mCg = NULL;
|
||||
mData = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user