diff options
author | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2017-07-28 06:54:06 (GMT) |
---|---|---|
committer | Adrián Medraño Calvo <adrian@medranocalvo.com> | 2017-07-28 07:11:19 (GMT) |
commit | d2c078754fbaee1bd22d77202f9af3d706f45b94 (patch) | |
tree | de4a975872eca1b01fc9ac74f175af98e7283ee5 /generic/tkbltGrBind.C | |
parent | e8635888a9d67eff399ad5d5fdded50dcc7e843a (diff) | |
download | blt-d2c078754fbaee1bd22d77202f9af3d706f45b94.zip blt-d2c078754fbaee1bd22d77202f9af3d706f45b94.tar.gz blt-d2c078754fbaee1bd22d77202f9af3d706f45b94.tar.bz2 |
Stop checking for NULL before free
The 'delete' operator checks whether the lvalue is NULL before freeing.
Diffstat (limited to 'generic/tkbltGrBind.C')
-rw-r--r-- | generic/tkbltGrBind.C | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tkbltGrBind.C b/generic/tkbltGrBind.C index 2873c8f..3e7e81e 100644 --- a/generic/tkbltGrBind.C +++ b/generic/tkbltGrBind.C @@ -160,8 +160,7 @@ void BindTable::doEvent(XEvent* eventPtr) const char** tagArray = graphPtr_->getTags(item, classId, &nTags); Tk_BindEvent(table_, eventPtr, graphPtr_->tkwin_, nTags, (void**)tagArray); - if (tagArray) - delete [] tagArray; + delete [] tagArray; } void BindTable::pickItem(XEvent* eventPtr) |