diff --git a/include/hyprcursor/hyprcursor.hpp b/include/hyprcursor/hyprcursor.hpp index 0e0f280..bf91706 100644 --- a/include/hyprcursor/hyprcursor.hpp +++ b/include/hyprcursor/hyprcursor.hpp @@ -58,6 +58,8 @@ namespace Hyprcursor { If none found, bool valid() will be false. If loading fails, bool valid() will be false. + + If theme has no valid cursor shapes, bool valid() will be false. */ class CHyprcursorManager { public: diff --git a/libhyprcursor/hyprcursor.cpp b/libhyprcursor/hyprcursor.cpp index a78d2ba..f6bd20a 100644 --- a/libhyprcursor/hyprcursor.cpp +++ b/libhyprcursor/hyprcursor.cpp @@ -248,6 +248,11 @@ void CHyprcursorManager::init(const char* themeName_) { return; } + if (impl->theme.shapes.empty()) { + Debug::log(HC_LOG_ERR, logFn, "Theme {} has no valid cursor shapes\n", impl->themeName); + return; + } + finalizedAndValid = true; }