diff options
author | Vaxry <[email protected]> | 2022-07-15 23:21:46 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2022-07-15 23:21:46 +0200 |
commit | 069e3b211492f8f7d788154058d84ffbe3324055 (patch) | |
tree | 1631bbcef6196c82ce6d6ecb5c74020fc675493c /hyprctl | |
parent | fbcc6936f4dc676ff2970e44a919ebc6e24627d3 (diff) | |
parent | db693ec7e590138517fe1b1f3ac0e409dbbea211 (diff) | |
download | Hyprland-069e3b211492f8f7d788154058d84ffbe3324055.tar.gz Hyprland-069e3b211492f8f7d788154058d84ffbe3324055.zip |
Merge pull request #376 from dgerblick/hyprctl-json-segfault-fix
Fixed SEGFAULT when running hyprctl with only the -j option
Diffstat (limited to 'hyprctl')
-rw-r--r-- | hyprctl/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index f2f4b712..8d9b6d96 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -232,6 +232,11 @@ int main(int argc, char** argv) { fullRequest += ARGS[i] + " "; } + if (fullRequest.empty()) { + printf("%s\n", USAGE.c_str()); + return 1; + } + fullRequest.pop_back(); // remove trailing space fullRequest = fullArgs + "/" + fullRequest; |