projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9823b82
)
check for valid callback in bind()
author
Dana Jansens
<danakj@orodu.net>
Thu, 2 Jan 2003 22:53:52 +0000
(22:53 +0000)
committer
Dana Jansens
<danakj@orodu.net>
Thu, 2 Jan 2003 22:53:52 +0000
(22:53 +0000)
src/openbox.i
patch
|
blob
|
history
diff --git
a/src/openbox.i
b/src/openbox.i
index 0e98bbfd49e63946da1213c6ee92908752531f2d..c82364452807907df62ef345bea326bde8cce96c 100644
(file)
--- a/
src/openbox.i
+++ b/
src/openbox.i
@@
-99,6
+99,10
@@
PyObject * unregister_all(int action)
PyObject * bind(PyObject *keylist, PyObject *func)
{
+ if (!PyCallable_Check(func)) {
+ PyErr_SetString(PyExc_TypeError, "Invalid callback function.");
+ return NULL;
+ }
if (!PyList_Check(keylist)) {
PyErr_SetString(PyExc_TypeError, "Invalid keylist. Not a list.");
return NULL;