From 5f17d9a1dfe6db0d3e5069ff42b4e4fbfbc2aa2f Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 12 Aug 2006 02:33:36 +0000 Subject: [PATCH] Don't deref v if it's NULL. Klocwork #214 --- Modules/_tkinter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 640b70f0ff5..0b853b5b48b 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; }