ivi-shell: bugfix, check limitation of ivi_layout_layer opacity

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
Nobuhiko Tanibata 2015-06-22 15:30:09 +09:00 committed by Pekka Paalanen
parent a86226c7c4
commit 7bbacc6165
1 changed files with 3 additions and 1 deletions

View File

@ -1951,7 +1951,9 @@ ivi_layout_layer_set_opacity(struct ivi_layout_layer *ivilayer,
{ {
struct ivi_layout_layer_properties *prop = NULL; struct ivi_layout_layer_properties *prop = NULL;
if (ivilayer == NULL) { if (ivilayer == NULL ||
opacity < wl_fixed_from_double(0.0) ||
wl_fixed_from_double(1.0) < opacity) {
weston_log("ivi_layout_layer_set_opacity: invalid argument\n"); weston_log("ivi_layout_layer_set_opacity: invalid argument\n");
return IVI_FAILED; return IVI_FAILED;
} }