aboutsummaryrefslogtreecommitdiffhomepage
path: root/hyprctl
diff options
context:
space:
mode:
authorVaxry <[email protected]>2022-07-15 23:21:46 +0200
committerGitHub <[email protected]>2022-07-15 23:21:46 +0200
commit069e3b211492f8f7d788154058d84ffbe3324055 (patch)
tree1631bbcef6196c82ce6d6ecb5c74020fc675493c /hyprctl
parentfbcc6936f4dc676ff2970e44a919ebc6e24627d3 (diff)
parentdb693ec7e590138517fe1b1f3ac0e409dbbea211 (diff)
downloadHyprland-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.cpp5
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;