Commit 52ec6df5 authored by Jeff Muizelaar's avatar Jeff Muizelaar
Browse files

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
parent 203dc9e4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
  }