From: Andrew M. Kuchling Date: Tue, 3 Oct 2006 19:02:58 +0000 (+0000) Subject: [Backport r51229 | neal.norwitz] X-Git-Tag: v2.4.4c1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b06e0e7a21eef1e5754acf5a37910fefcf24b9a;p=thirdparty%2FPython%2Fcpython.git [Backport r51229 | neal.norwitz] Don't deref v if it's NULL. Klocwork #214 --- diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index ab566125be08..0051e93ff058 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2482,8 +2482,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; }