popup: fix unintentional object deletion when change scrollable
authorJinYong Park <j4939.park@samsung.com>
Mon, 5 Jun 2017 18:08:45 +0000 (11:08 -0700)
committerCedric BAIL <cedric@osg.samsung.com>
Mon, 5 Jun 2017 19:07:56 +0000 (12:07 -0700)
commit2b2d22494714acb30d2adffd5bc67a85e472db50
tree17d6298401e8220609a80f54608c51a9b4ad5b8f
parent2f025184f775dcb2ba43f1b871ff2f7c7adfd23a
popup: fix unintentional object deletion when change scrollable

Summary:
If popup scrollable change from FALSE to TRUE after content or text is added,
content_area is deleted, so it cause null pointer problem.
main_layout has content_area in its CONTENT_PART, but in scrollable_set API,
tbl set into main_layout's CONTENT_PART, so content_area is deleted.

On the contrary, if scrollable change to FALSE,
content object in content_area is deleted, because tbl set into content_area's CONTENT_PART.

So if some object set into other object,
unset previous object and set it into properly part after that.

A case using item_append should be fixed by other patch.

@fix

Test Plan: Change scrollable repeatedly after adding content or text to popup.

Reviewers: jpeg, singh.amitesh, conr2d, cedric, raster

Reviewed By: cedric

Subscribers: herb

Differential Revision: https://phab.enlightenment.org/D4894

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
src/lib/elementary/elc_popup.c