code: handle out of memory as well as possible

This commit is contained in:
Isaac Freund
2020-07-05 22:49:17 +02:00
parent 3752a7879b
commit 341fe1e977
10 changed files with 55 additions and 44 deletions

View File

@ -140,7 +140,5 @@ fn handleNewInput(listener: ?*c.wl_listener, data: ?*c_void) callconv(.C) void {
const device = util.voidCast(c.wlr_input_device, data.?);
// TODO: suport multiple seats
if (self.seats.first) |seat_node| {
seat_node.data.addDevice(device) catch unreachable;
}
self.default_seat.addDevice(device);
}