lib: Count cursor-less themes as invalid (#31)

This commit is contained in:
SoSeDiK 2024-04-10 19:29:25 +03:00 committed by GitHub
parent 6742e9d3e2
commit f6a6322a03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,8 @@ namespace Hyprcursor {
If none found, bool valid() will be false. If none found, bool valid() will be false.
If loading fails, 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 { class CHyprcursorManager {
public: public:

View File

@ -248,6 +248,11 @@ void CHyprcursorManager::init(const char* themeName_) {
return; return;
} }
if (impl->theme.shapes.empty()) {
Debug::log(HC_LOG_ERR, logFn, "Theme {} has no valid cursor shapes\n", impl->themeName);
return;
}
finalizedAndValid = true; finalizedAndValid = true;
} }