From: Neal Norwitz Date: Sat, 12 Aug 2006 02:33:36 +0000 (+0000) Subject: Don't deref v if it's NULL. X-Git-Tag: v2.5c1~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f17d9a1dfe6db0d3e5069ff42b4e4fbfbc2aa2f;p=python Don't deref v if it's NULL. Klocwork #214 --- diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 640b70f0ff..0b853b5b48 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2493,8 +2493,10 @@ Tkapp_CreateTimerHandler(PyObject *self, PyObject *args) } v = Tktt_New(func); - v->token = Tcl_CreateTimerHandler(milliseconds, TimerHandler, - (ClientData)v); + if (v) { + v->token = Tcl_CreateTimerHandler(milliseconds, TimerHandler, + (ClientData)v); + } return (PyObject *) v; }