Fix a NPE

We may not get a cursor back from query(), and if that happens, we
shouldn't try to use the null cursor.

Bug: 9287151
Change-Id: Ie91d8003f51ea160e5b709a5cd6bcabefc3c687a
1 file changed