From: Nobuhiko Tanibata <nobuhiko_tanib...@xddp.denso.co.jp>

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanib...@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
---
 ivi-shell/ivi-layout.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 50ce22f..88629ad 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -1951,7 +1951,9 @@ ivi_layout_layer_set_opacity(struct ivi_layout_layer 
*ivilayer,
 {
        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");
                return IVI_FAILED;
        }
-- 
1.8.3.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to