* java/org/gnu/emacs/EmacsService.java (queryTree): Fix NULL
pointer dereference.
* src/android.c (android_query_tree): Set *nchildren_return.
array = new short[windowList.size () + 1];
i = 1;
- array[0] = window.parent != null ? 0 : window.parent.handle;
+ array[0] = (window == null
+ ? 0 : (window.parent != null
+ ? window.parent.handle : 0));
for (EmacsWindow treeWindow : windowList)
array[i++] = treeWindow.handle;
*root_return = 0;
*parent_return = shorts[0];
*children_return = children;
+ *nchildren_return = nelements - 1;
/* Release the array contents. */
(*android_java_env)->ReleaseShortArrayElements (android_java_env, array,