Skip to content

Commit 0eba0bb

Browse files
Ensure content is not None before using it.
Co-authored-by: Phùng Xuân Anh <phungxuananh1991@gmail.com>
1 parent 9da64bd commit 0eba0bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

guake/dialogs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def run(self):
149149
col = self.terminal.get_column_count()
150150
content = self.terminal.get_text_range(0, 0, row, col)
151151

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

0 commit comments

Comments
 (0)