diff Modules/_tkinter.c @ 39968:b7e34fbc80ad 2.4

[Backport r51229 | neal.norwitz] Don't deref v if it's NULL. Klocwork #214
author Andrew M. Kuchling <amk@amk.ca>
date Tue, 03 Oct 2006 19:02:58 +0000
parents 6fb46e87d5f9
children
line wrap: on
line diff
--- a/Modules/_tkinter.c	Tue Oct 03 18:55:06 2006 +0000
+++ b/Modules/_tkinter.c	Tue Oct 03 19:02:58 2006 +0000
@@ -2482,8 +2482,10 @@
 	}
 
 	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;
 }