mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05:00
Remove calls to assert to check runtime errors in rootston
This commit is contained in:
parent
c8570d0e42
commit
f2c4b80620
3 changed files with 43 additions and 10 deletions
|
|
@ -202,11 +202,18 @@ struct roots_view *view_at(struct roots_desktop *desktop, double lx, double ly,
|
|||
|
||||
struct roots_desktop *desktop_create(struct roots_server *server,
|
||||
struct roots_config *config) {
|
||||
struct roots_desktop *desktop = calloc(1, sizeof(struct roots_desktop));
|
||||
assert(desktop);
|
||||
wlr_log(L_DEBUG, "Initializing roots desktop");
|
||||
|
||||
assert(desktop->views = list_create());
|
||||
struct roots_desktop *desktop = calloc(1, sizeof(struct roots_desktop));
|
||||
if (desktop == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
desktop->views = list_create();
|
||||
if (desktop->views == NULL) {
|
||||
free(desktop);
|
||||
return NULL;
|
||||
}
|
||||
wl_list_init(&desktop->outputs);
|
||||
|
||||
desktop->output_add.notify = output_add_notify;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue