diff options
author | joye <joye> | 2014-05-05 17:51:56 (GMT) |
---|---|---|
committer | joye <joye> | 2014-05-05 17:51:56 (GMT) |
commit | 16a5c9af45ae9e810e8eebaa4e1663ea64d8c255 (patch) | |
tree | 7f9938e97f5a211acf02694df6efbbce887e0ea7 /src/bltGrPenOption.C | |
parent | 087375001ab2d4534011ef295bedf70b89cc3986 (diff) | |
download | blt-16a5c9af45ae9e810e8eebaa4e1663ea64d8c255.zip blt-16a5c9af45ae9e810e8eebaa4e1663ea64d8c255.tar.gz blt-16a5c9af45ae9e810e8eebaa4e1663ea64d8c255.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'src/bltGrPenOption.C')
-rw-r--r-- | src/bltGrPenOption.C | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bltGrPenOption.C b/src/bltGrPenOption.C index d263ffc..3aab56b 100644 --- a/src/bltGrPenOption.C +++ b/src/bltGrPenOption.C @@ -81,11 +81,9 @@ static Tcl_Obj* PenGetProc(ClientData clientData, Tk_Window tkwin, static void PenFreeProc(ClientData clientData, Tk_Window tkwin, char *ptr) { Pen* penPtr = *(Pen**)ptr; - if (penPtr) { - penPtr->refCount_--; - if (penPtr->refCount_ == 0) - delete penPtr; - } + if (penPtr) + if (penPtr->refCount_ > 0) + penPtr->refCount_--; } |