Skip to content

Commit 6b8411c

Browse files
committed
fix symbol:variable cursor
1 parent 9c8f9ed commit 6b8411c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/java/flutter/plugins/contactsservice/contactsservice/ContactsServicePlugin.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,9 @@ public boolean onActivityResult(int requestCode, int resultCode, Intent intent)
296296
Log.e(LOG_TAG, "onActivityResult - cursor.moveToFirst() returns false");
297297
finishWithResult(FORM_OPERATION_CANCELED);
298298
}}else{return true;}
299-
cursor.close();
299+
if (cursor != null) {
300+
cursor.close();
301+
}
300302
return true;
301303
}
302304

0 commit comments

Comments
 (0)