c.to_selected_tags(): Handle screenless clients

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2016-04-25 21:12:10 +02:00
parent 8ca65cbc26
commit ac81a8df1f
1 changed files with 7 additions and 5 deletions

View File

@ -446,12 +446,14 @@ function client.object.to_selected_tags(self)
end
end
if #tags == 0 then
tags = self.screen.selected_tags
end
if self.screen then
if #tags == 0 then
tags = self.screen.selected_tags
end
if #tags == 0 then
tags = self.screen.tags
if #tags == 0 then
tags = self.screen.tags
end
end
if #tags ~= 0 then