From 8cb38d41d203f95ea9c2be79996a5f0deda3eabf Mon Sep 17 00:00:00 2001 From: Micovec <30734146+Micovec@users.noreply.github.com> Date: Sun, 31 Mar 2024 22:45:22 +0200 Subject: [PATCH] hyprctl: fix plugin list on no plugins (#5357) --- src/debug/HyprCtl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) {