diff options
author | Micovec <[email protected]> | 2024-03-31 22:45:22 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2024-03-31 21:45:22 +0100 |
commit | 8cb38d41d203f95ea9c2be79996a5f0deda3eabf (patch) | |
tree | f92306f08428a70d666db917e46ae71cb0e667ea | |
parent | 9e8f0518961041b60e6c4843f545734e833d5355 (diff) | |
download | Hyprland-8cb38d41d203f95ea9c2be79996a5f0deda3eabf.tar.gz Hyprland-8cb38d41d203f95ea9c2be79996a5f0deda3eabf.zip |
hyprctl: fix plugin list on no plugins (#5357)
-rw-r--r-- | src/debug/HyprCtl.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/debug/HyprCtl.cpp b/src/debug/HyprCtl.cpp index 903b7d7f..f61f5544 100644 --- a/src/debug/HyprCtl.cpp +++ b/src/debug/HyprCtl.cpp @@ -1449,7 +1449,10 @@ std::string dispatchPlugin(eHyprCtlOutputFormat format, std::string request) { g_pPluginSystem->unloadPlugin(PLUGIN); } else if (OPERATION == "list") { - const auto PLUGINS = g_pPluginSystem->getAllPlugins(); + const auto PLUGINS = g_pPluginSystem->getAllPlugins(); + + if (PLUGINS.size() == 0) + return "no plugins loaded"; std::string list = ""; for (auto& p : PLUGINS) { |