Skip to content

Commit

Permalink
Prevent attempt to get data when nothing has been selected. references
Browse files Browse the repository at this point in the history
  • Loading branch information
Zen-CODE committed Jan 18, 2020
1 parent 3e55526 commit 95811c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plyer/platforms/android/filechooser.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def _on_activity_result(self, request_code, result_code, data):
.. versionadded:: 1.4.0
'''

# not our response
if request_code != self.select_code:
# not our response, or nothing has been selected (selection cancelled)
if (request_code != self.select_code) or not data:
return

# bad response
Expand Down

0 comments on commit 95811c8

Please sign in to comment.