mirror of
https://github.com/hyprwm/hyprcursor.git
synced 2024-12-22 10:19:48 +01:00
tests: Prevent tests from crashing when manager is invalid (#9)
This commit is contained in:
parent
e3694ecf2f
commit
8a874fc49c
2 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,10 @@ int main(int argc, char** argv) {
|
|||
printf("mgr null\n");
|
||||
return 1;
|
||||
}
|
||||
if (!hyprcursor_manager_valid(mgr)) {
|
||||
printf("mgr is invalid\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
struct hyprcursor_cursor_style_info info = {.size = 48};
|
||||
if (!hyprcursor_load_theme_style(mgr, info)) {
|
||||
|
|
|
@ -4,8 +4,12 @@
|
|||
int main(int argc, char** argv) {
|
||||
Hyprcursor::CHyprcursorManager mgr(nullptr);
|
||||
|
||||
Hyprcursor::SCursorStyleInfo style{.size = 48};
|
||||
if (!mgr.valid()) {
|
||||
std::cout << "mgr is invalid\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
Hyprcursor::SCursorStyleInfo style{.size = 48};
|
||||
// preload size 48 for testing
|
||||
if (!mgr.loadThemeStyle(style)) {
|
||||
std::cout << "failed loading style\n";
|
||||
|
|
Loading…
Reference in a new issue