Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
return "Cannot deactivate main_surface";
}
return "Cannot deactivate main_surface";
}
- struct LayoutState &state = **this->layers.get_layout_state(*surface_id);
+ auto o_state = *this->layers.get_layout_state(*surface_id);
+
+ if (! o_state) {
+ return "Could not find layer for surface";
+ }
+
+ struct LayoutState &state = *o_state;
if (state.main == -1) {
return "No surface active";
if (state.main == -1) {
return "No surface active";