Skip to content

Commit

Permalink
fix: prevent error when opening second instance without arguments
Browse files Browse the repository at this point in the history
fix #23
  • Loading branch information
vzhd1701 committed Jan 3, 2022
1 parent f441f88 commit 3c33209
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gridplayer/player/managers/playlist.py
Expand Up @@ -97,6 +97,9 @@ def cmd_save_playlist(self):
}

def process_arguments(self, argv):
if not argv:
return

files = filter_valid_files(list(map(Path, argv)))

if not files:
Expand Down
2 changes: 1 addition & 1 deletion gridplayer/utils/single_instance.py
Expand Up @@ -108,7 +108,7 @@ def _handle_input_data(self, input_data):
if input_data == "ping":
logger.debug("Received ping from another instance")

if isinstance(input_data, list):
if isinstance(input_data, list) and input_data:
self.open_files.emit(input_data)


Expand Down

0 comments on commit 3c33209

Please sign in to comment.