ivi-shell: bugfix, add ref_count to ivi_layout_layer
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Mon, 22 Jun 2015 06:31:16 +0000 (15:31 +0900)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Tue, 23 Jun 2015 12:57:15 +0000 (15:57 +0300)
commit4b601e152ec3d2d140f8748a066704957b85757a
tree8d6840a8b2fe73ac8422c0242e0da31ee69f832c
parent680984234a4462a3b1949559d406eefb06e2bd3b
ivi-shell: bugfix, add ref_count to ivi_layout_layer

if a controller calls ivi_layout_layer_create_with_demenstion with a ID
which is already created before, the API returns exist ivi_layer.
However addtionally, it shall count up ref count to destroy ivi_layer
when ref count is 0. The previous code will destroy ivi_layer
immediately even if the other code still refers ivi_layer.

Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
ivi-shell/ivi-layout-private.h
ivi-shell/ivi-layout.c