Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[Fixed] trying to remove listener where given id is undefined #9547
I'd like to know more about exactly what the cause or your original issue was - when I've come across this myself, it's always as a side effect of another problem (often to do with lists and controllers), and triggered by recursive binding (eg part way through binding a widget, an event causes the model or selection of the original widget to change, causing the binding to be redone part way through).
IMHO there are definitely opportunities to improve error detection in bindings because when it goes wrong it is hard to track down what on earth is really going on, but this also makes me cautious about applying fixes which may be only masking the "real" problem.
Do you mean here ?
That looks like a redundant check, otherwise it would be a symptom of a resource leak (ie an un-freed listener) because it is not possible to release a listenerId without the object to release it from.
ie this code might be "more correct" (not that I'm suggesting that you make this change, but just to illustrate):