Skip to content

Commit

Permalink
Ensure content is not None before using it.
Browse files Browse the repository at this point in the history
Co-authored-by: Phùng Xuân Anh <phungxuananh1991@gmail.com>
  • Loading branch information
Davidy22 and PhungXuanAnh committed Dec 18, 2024
1 parent 9da64bd commit 0eba0bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guake/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def run(self):
col = self.terminal.get_column_count()
content = self.terminal.get_text_range(0, 0, row, col)

if content:
if content and content[0]:
selection = content[0].rstrip().lstrip()
else: # Call the original method if get_text_range fails for some reason. (Can it fail?)
self.terminal.select_all()
Expand Down

0 comments on commit 0eba0bb

Please sign in to comment.