add an assert to catch bad stuff from the python
This commit is contained in:
parent
833276412e
commit
f28550dc28
1 changed files with 1 additions and 0 deletions
|
@ -481,6 +481,7 @@ bool Bindings::addButton(const std::string &but, MouseContext::MC context,
|
||||||
MouseAction::MA action, PyObject *callback)
|
MouseAction::MA action, PyObject *callback)
|
||||||
{
|
{
|
||||||
assert(context >= 0 && context < MouseContext::NUM_MOUSE_CONTEXT);
|
assert(context >= 0 && context < MouseContext::NUM_MOUSE_CONTEXT);
|
||||||
|
assert(action >= 0 && context < MouseContext::NUM_MOUSE_ACTION);
|
||||||
|
|
||||||
Binding b(0,0);
|
Binding b(0,0);
|
||||||
if (!translate(but, b, false))
|
if (!translate(but, b, false))
|
||||||
|
|
Loading…
Reference in a new issue