Index: gmenu.c
===================================================================
--- gmenu.c	(revision 685)
+++ gmenu.c	(working copy)
@@ -1509,7 +1509,7 @@
       PyTuple_SET_ITEM (args, 1, callback->user_data);
     }
 
-  ret = PyObject_CallObject (callback->callback, args);
+  ret = PyEval_CallObject (callback->callback, args);
 
   Py_XDECREF (ret);
   Py_DECREF (args);
@@ -1522,10 +1522,14 @@
   PyGMenuTree         *tree;
   PyGMenuTreeCallback *callback;
   PyObject            *pycallback;
-  PyObject            *pyuser_data;
+  PyObject            *pyuser_data = NULL;
 
   if (!PyArg_ParseTuple (args, "O|O:gmenu.Tree.add_monitor", &pycallback, &pyuser_data))
     return NULL;
+  if (!PyCallable_Check(pycallback)) {
+    PyErr_SetString(PyExc_TypeError, "parameter must be callable");
+    return NULL;
+  }
 
   tree = (PyGMenuTree *) self;
 
