summaryrefslogtreecommitdiff
path: root/src/debug/HyprCtl.cpp
diff options
context:
space:
mode:
authorMicovec <30734146+Micovec@users.noreply.github.com>2024-03-31 22:45:22 +0200
committerGitHub <noreply@github.com>2024-03-31 21:45:22 +0100
commit8cb38d41d203f95ea9c2be79996a5f0deda3eabf (patch)
treef92306f08428a70d666db917e46ae71cb0e667ea /src/debug/HyprCtl.cpp
parent9e8f0518961041b60e6c4843f545734e833d5355 (diff)
hyprctl: fix plugin list on no plugins (#5357)
Diffstat (limited to 'src/debug/HyprCtl.cpp')
-rw-r--r--src/debug/HyprCtl.cpp5
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) {