diff options
author | Tomas Farago <sensej007@email.cz> | 2021-10-19 13:20:32 +0200 |
---|---|---|
committer | Tomas Farago <sensej007@email.cz> | 2021-10-19 13:20:32 +0200 |
commit | 9069d2a60fe1e02f9eac4b76ef9f1181905d7d49 (patch) | |
tree | 64d5cf6e8b1eec0befa0c941b6292bcc48389aaa | |
parent | 4ef3f644ca66585c91187b7896c83b941d68b6c5 (diff) | |
download | ufo-filters-9069d2a60fe1e02f9eac4b76ef9f1181905d7d49.tar.gz ufo-filters-9069d2a60fe1e02f9eac4b76ef9f1181905d7d49.tar.bz2 ufo-filters-9069d2a60fe1e02f9eac4b76ef9f1181905d7d49.tar.xz ufo-filters-9069d2a60fe1e02f9eac4b76ef9f1181905d7d49.zip |
flatten: complain when input is 2D
-rw-r--r-- | src/ufo-flatten-task.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |