diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-09-23 13:26:35 +0100 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-09-23 13:26:35 +0100 |
| commit | 9c00381dfcdebc1b392f0e05552775adc069f163 (patch) | |
| tree | e00be17d19b8a13cc0c3ec1659901f53689092b7 /src/debug/HyprCtl.cpp | |
| parent | fb80cbe415835a7e0c64e2038d0fc56e8aba0ab4 (diff) | |
hyprctl: avoid .pop_back() on empty string
Diffstat (limited to 'src/debug/HyprCtl.cpp')
| -rw-r--r-- | src/debug/HyprCtl.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 29d2b4d1..f37b24e6 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -835,7 +835,8 @@ std::string dispatchSetCursor(std::string request) { std::string theme = ""; for (size_t i = 1; i < vars.size() - 1; ++i) theme += vars[i] + " "; - theme.pop_back(); + if (!theme.empty()) + theme.pop_back(); int size = 0; try { |
