Fix assertion fail when using a non i3 window manager

This commit is contained in:
Josef Utbult
2022-11-18 18:58:20 +01:00
parent 7c2f465cbb
commit ee4ce3ddc5

View File

@@ -325,7 +325,7 @@ std::string get_socketpath() {
pclose(in); pclose(in);
str = str_buf; str = str_buf;
} }
if (str.back() == '\n') { if (str.length() > 0 && str.back() == '\n') {
str.pop_back(); str.pop_back();
} }
return str; return str;