aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Primak <vyivel@eclair.cafe>2023-10-08 13:11:29 +0300
committerKirill Primak <vyivel@eclair.cafe>2023-10-08 13:11:29 +0300
commitb06c2f3d1fef3b4d75bd846c832234bf722c0d7e (patch)
treef62b8dae3fbcd8ca36b07feb242b687a1d584d82
parente1e911d425fde6ce85475de95b44aa1340725224 (diff)
scene-output-layout: assert lo->output == so->output
-rw-r--r--types/scene/output_layout.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/types/scene/output_layout.c b/types/scene/output_layout.c
index c9835382..ffe0d3ec 100644
--- a/types/scene/output_layout.c
+++ b/types/scene/output_layout.c
@@ -1,3 +1,4 @@
+#include <assert.h>
#include <stdlib.h>
#include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_scene.h>
@@ -70,6 +71,8 @@ static void scene_output_layout_handle_layout_change(
void wlr_scene_output_layout_add_output(struct wlr_scene_output_layout *sol,
struct wlr_output_layout_output *lo, struct wlr_scene_output *so) {
+ assert(lo->output == so->output);
+
struct wlr_scene_output_layout_output *solo = calloc(1, sizeof(*solo));
if (solo == NULL) {
return;