GNOME Bugzilla – Bug 341330
Add null check for TreeStore.isIterValid()
Last modified: 2007-01-05 00:58:42 UTC
Right now the bindings just pipe to gtk_tree_store_iter_is_valid: public boolean isIterValid(TreeIter iter) { return gtk_tree_store_iter_is_valid(getHandle(), iter.getHandle()); } However if iter is null, iter.getHandle() will raise an NPE. That requires me to either: 1) Handle the possible NPE whenever I do an TreeStore.isIterValid() or 2) Test for null myself. Everytime I need to check an TreeIter, right now that requires me to write two tests. I request that isIterValid do the null test, and return false if null. (After all I don't care why the TreeIter is invalid, whether it points to nowhere or is a null, just that it is invalid)
Concur. It should return false if the argument is null. [I suspect we need guards like this all over the bindings. Might as well start here] AfC
I'll make this change and commit it.
I've commit this change, along with a paralel one in ListStore.java