diff options
author | jenglish <jenglish@noemail.net> | 2010-05-31 17:35:29 (GMT) |
---|---|---|
committer | jenglish <jenglish@noemail.net> | 2010-05-31 17:35:29 (GMT) |
commit | 0869c963937f50681fa88677dcc8183c51a7ecdb (patch) | |
tree | bf07a038f028c29ed86bf2c97ed2a41b2e0fd2bd | |
parent | 27b5097d3d9ccdc78760c3f22b1fe6fd3100bb59 (diff) | |
download | tk-0869c963937f50681fa88677dcc8183c51a7ecdb.zip tk-0869c963937f50681fa88677dcc8183c51a7ecdb.tar.gz tk-0869c963937f50681fa88677dcc8183c51a7ecdb.tar.bz2 |
Tk_CreateBinding): Silently ignore empty scripts (Fixes [Bug 3006842]).
FossilOrigin-Name: c7f50addddddb20787a9295b8b8839782085ac12
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tkBind.c | 8 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2010-05-31 Joe English <jenglish@users.sourceforge.net> + + * generic/tkBind.c(Tk_CreateBinding): Silently ignore empty + scripts (Fixes [Bug 3006842]). + 2010-05-27 Joe English <jenglish@users.sourceforge.net> * generic/ttk/ttkTreeview.c, tests/ttk/treeview.test: diff --git a/generic/tkBind.c b/generic/tkBind.c index 67231cd..c610330 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkBind.c,v 1.65 2010/05/17 17:19:22 jenglish Exp $ + * RCS: @(#) $Id: tkBind.c,v 1.66 2010/05/31 17:35:29 jenglish Exp $ */ #include "tkInt.h" @@ -958,6 +958,10 @@ Tk_CreateBinding( unsigned long eventMask; char *newStr, *oldStr; + if (!*script) { + /* Silently ignore empty scripts -- see SF#3006842 */ + return 1; + } psPtr = FindSequence(interp, &bindPtr->patternTable, object, eventString, 1, 1, &eventMask); if (psPtr == NULL) { @@ -1019,7 +1023,7 @@ Tk_CreateBinding( /* *--------------------------------------------------------------------------- * - * TkCreateBindingFunction -- + * TkCreateBindingProcedure -- * * Add a C binding to a binding table, so that future calls to * Tk_BindEvent may callback the function in the binding. |