From 6591fa264a9316785a0601f0b25f2fd1994dad22 Mon Sep 17 00:00:00 2001 From: huiyueun <35286162+huiyueun@users.noreply.github.com> Date: Wed, 17 Jan 2018 17:50:53 +0900 Subject: [PATCH] [NUI] Fix SiblingOrder return value (#37) If parentChildren count is empty, return 0 Signed-off-by: huiyu,eun --- src/Tizen.NUI/src/public/BaseComponents/View.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index d66053c..165d30d 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -2234,14 +2234,18 @@ namespace Tizen.NUI.BaseComponents if (parentChildren != null) { currentOrder = parentChildren.IndexOf(this); - - if (currentOrder < parentChildren.Count) + + if (currentOrder < 0) + { + return 0; + } + else if (currentOrder < parentChildren.Count) { return currentOrder; } } - - return currentOrder; + + return 0; } set { -- 2.7.4