From 9069d2a60fe1e02f9eac4b76ef9f1181905d7d49 Mon Sep 17 00:00:00 2001 From: Tomas Farago Date: Tue, 19 Oct 2021 13:20:32 +0200 Subject: flatten: complain when input is 2D --- src/ufo-flatten-task.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ufo-flatten-task.c b/src/ufo-flatten-task.c index 3021876..ba5521e 100644 --- a/src/ufo-flatten-task.c +++ b/src/ufo-flatten-task.c @@ -118,6 +118,13 @@ ufo_flatten_task_process (UfoTask *task, gfloat *out_mem; gfloat *tmp; gsize width, height, depth; + UfoRequisition in_req; + + ufo_buffer_get_requisition (inputs[0], &in_req); + if (in_req.n_dims != 3) { + g_warning ("Flatten task requires a 3D input"); + return TRUE; + } in_mem = ufo_buffer_get_host_array (inputs[0], NULL); out_mem = ufo_buffer_get_host_array (output, NULL); -- cgit v1.2.1