diff --git a/gfx/2d/DrawTargetCG.cpp b/gfx/2d/DrawTargetCG.cpp index 00f5167f9ac..4311a6c5ba4 100644 --- a/gfx/2d/DrawTargetCG.cpp +++ b/gfx/2d/DrawTargetCG.cpp @@ -1034,6 +1034,7 @@ DrawTargetCG::Init(CGContextRef cgContext, const IntSize &aSize) mSize = aSize; mCg = cgContext; + CGContextRetain(mCg); mData = nullptr;