summaryrefslogtreecommitdiff
path: root/Lib/tcl
diff options
context:
space:
mode:
authorOlly Betts <olly@survex.com>2016-12-13 12:19:50 +1300
committerOlly Betts <olly@survex.com>2016-12-13 12:19:50 +1300
commit23c08658311984045f1af573727e3f06adc6db06 (patch)
treeeaf0ca0bc56faaeabea26c903a6294508e6537ac /Lib/tcl
parenta5a6da95478d4b0b47adbbf51c85cdd2bbbcc60d (diff)
downloadswig-23c08658311984045f1af573727e3f06adc6db06.tar.gz
SWIG_Tcl_ObjectDelete: Fix potential NULL pointer dereferences
Diffstat (limited to 'Lib/tcl')
-rw-r--r--Lib/tcl/tclrun.swg3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/tcl/tclrun.swg b/Lib/tcl/tclrun.swg
index e6531e555..f671ba240 100644
--- a/Lib/tcl/tclrun.swg
+++ b/Lib/tcl/tclrun.swg
@@ -293,7 +293,8 @@ SWIG_Tcl_SetModule(Tcl_Interp *interp, swig_module_info *module) {
SWIGRUNTIME void
SWIG_Tcl_ObjectDelete(ClientData clientData) {
swig_instance *si = (swig_instance *) clientData;
- if ((si) && (si->destroy) && (SWIG_Disown(si->thisvalue))) {
+ if (!si) return;
+ if (si->destroy && SWIG_Disown(si->thisvalue)) {
if (si->classptr->destructor) {
(si->classptr->destructor)(si->thisvalue);
}