Skip to content

Commit

Permalink
Fix clone reference count
Browse files Browse the repository at this point in the history
git-svn-id: https://nekonme.googlecode.com/svn/trunk@1732 1509560c-5e2a-0410-865c-31c25e1cfdef
  • Loading branch information
hughsando committed Jul 4, 2012
1 parent 2f1f182 commit 2ddd3b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion project/common/Graphics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,15 +781,16 @@ GraphicsStroke *GraphicsStroke::CloneWithFill(IGraphicsFill *inFill)
{
if (mRefCount < 2)
{
inFill->IncRef();
if (fill)
fill->DecRef();
fill = inFill;
fill->IncRef();
return this;
}

GraphicsStroke *clone = new GraphicsStroke(inFill,thickness,pixelHinting,scaleMode,caps,joints,miterLimit);
DecRef();
clone->IncRef();
return clone;
}

Expand Down

0 comments on commit 2ddd3b9

Please sign in to comment.