summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Farago <sensej007@email.cz>2021-12-17 17:46:16 +0100
committerTomas Farago <sensej007@email.cz>2021-12-17 17:46:16 +0100
commitbfa4bd07e4239b4789e2185d611c0ed40b065245 (patch)
treef3a1976f4e13c6cb1b5fec0f8602bb1d5e68388e
parent065756bd0d540b654682bdb042bb434387e6f3ed (diff)
downloadufo-filters-bfa4bd07e4239b4789e2185d611c0ed40b065245.tar.gz
ufo-filters-bfa4bd07e4239b4789e2185d611c0ed40b065245.tar.bz2
ufo-filters-bfa4bd07e4239b4789e2185d611c0ed40b065245.tar.xz
ufo-filters-bfa4bd07e4239b4789e2185d611c0ed40b065245.zip
reader: turn warnings to errors
-rw-r--r--src/ufo-read-task.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/ufo-read-task.c b/src/ufo-read-task.c
index 5aeb731..8c8b3b5 100644
--- a/src/ufo-read-task.c
+++ b/src/ufo-read-task.c
@@ -279,9 +279,10 @@ ufo_read_task_get_requisition (UfoTask *task,
return;
if (priv->roi_y >= requisition->dims[1]) {
- g_warning ("read: vertical ROI start %i >= height %zu",
- priv->roi_y, requisition->dims[1]);
- priv->roi_y = 0;
+ g_set_error (error, UFO_TASK_ERROR, UFO_TASK_ERROR_GET_REQUISITION,
+ "read: vertical ROI start %i >= height %zu",
+ priv->roi_y, requisition->dims[1]);
+ return;
}
if (!priv->roi_height) {
@@ -289,9 +290,10 @@ ufo_read_task_get_requisition (UfoTask *task,
}
else {
if (priv->roi_y + priv->roi_height > requisition->dims[1]) {
- g_warning ("read: vertical ROI height %i >= height %zu",
- priv->roi_height, requisition->dims[1]);
- priv->roi_height = requisition->dims[1] - priv->roi_y;
+ g_set_error (error, UFO_TASK_ERROR, UFO_TASK_ERROR_GET_REQUISITION,
+ "read: vertical ROI start + height %i >= height %zu",
+ priv->roi_y + priv->roi_height, requisition->dims[1]);
+ return;
}
}
if (priv->image_start >= num_images) {