[NUI] Fixed Svace issues
authorzhouleonlei <zhouleon.lei@samsung.com>
Tue, 10 Nov 2020 02:52:38 +0000 (10:52 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 11 Nov 2020 02:33:04 +0000 (11:33 +0900)
21 files changed:
src/Tizen.NUI.Components/Controls/DropDown.DropDownListBridge.cs
src/Tizen.NUI.Components/Controls/DropDown.cs
src/Tizen.NUI.Components/Controls/Pagination.cs
src/Tizen.NUI.Components/Controls/RecyclerView/GridRecycleLayoutManager.cs [changed mode: 0644->0755]
src/Tizen.NUI.Components/Controls/RecyclerView/LinearRecycleLayoutManager.cs [changed mode: 0644->0755]
src/Tizen.NUI.Components/Controls/RecyclerView/RecyclerView.cs [changed mode: 0644->0755]
src/Tizen.NUI.Components/Controls/ScrollableBase.cs
src/Tizen.NUI.Components/Utils/StyleManager.cs
src/Tizen.NUI.Wearable/src/internal/FishEyeLayoutManager.cs [changed mode: 0644->0755]
src/Tizen.NUI.Wearable/src/public/CircularPagination.cs
src/Tizen.NUI.Wearable/src/public/WearableList.cs [changed mode: 0644->0755]
src/Tizen.NUI/src/internal/BackKeyManager.cs [changed mode: 0644->0755]
src/Tizen.NUI/src/internal/EnumHelper.cs
src/Tizen.NUI/src/internal/Layouting/LayoutController.cs
src/Tizen.NUI/src/internal/PropertyRangeManager.cs
src/Tizen.NUI/src/internal/WidgetApplication.cs
src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs
src/Tizen.NUI/src/internal/XamlBinding/MergedStyle.cs
src/Tizen.NUI/src/public/Layouting/FlexLayout.cs
src/Tizen.NUI/src/public/Layouting/LayoutItem.cs
src/Tizen.NUI/src/public/NUIFrameComponent.cs

index 0899013..d354209 100755 (executable)
@@ -100,6 +100,10 @@ namespace Tizen.NUI.Components
                     return;
                 }
                 DropDownItemView listItemView = holder.ItemView as DropDownItemView;
+                if (listItemView == null)
+                {
+                    return;
+                }
                 listItemView.Name = "Item" + position;
                 if (listItemData.Size != null)
                 {
index f336d19..ade1697 100755 (executable)
@@ -771,6 +771,10 @@ namespace Tizen.NUI.Components
         {
             PointStateType state = e.Touch.GetState(0);
             DropDownItemView touchedView = sender as DropDownItemView;
+            if (touchedView == null)
+            {
+                return true;
+            }
 
             touchedView.OnTouch(e.Touch); // Handle control state change
 
index 0f6d5c5..6c863e4 100755 (executable)
@@ -157,8 +157,11 @@ namespace Tizen.NUI.Components
             }
             set
             {
-                paginationStyle.IndicatorSpacing = value;
-                UpdateVisual();
+                if (paginationStyle != null)
+                {
+                    paginationStyle.IndicatorSpacing = value;
+                    UpdateVisual();
+                }
             }
         }
 
@@ -501,8 +504,8 @@ namespace Tizen.NUI.Components
 
         private void UpdateVisual()
         {
-            if (null == paginationStyle.IndicatorSize) return;
-            if (null == paginationStyle.IndicatorImageUrl) return;
+            if (null == paginationStyle?.IndicatorSize) return;
+            if (null == paginationStyle?.IndicatorImageUrl) return;
             if (indicatorCount < 0) return;
 
             for (int i = 0; i < indicatorList.Count; i++)
old mode 100644 (file)
new mode 100755 (executable)
index abfa02d..b546abc
@@ -86,7 +86,10 @@ namespace Tizen.NUI.Components
         {
             bool result = false;
             View list = Container.GetParent() as View;
-
+            if (list == null)
+            {
+                return result;
+            }
             Vector2 visibleArea = new Vector2(Math.Abs(scrollPosition),
                 Math.Abs(scrollPosition) + (LayoutOrientation == Orientation.Vertical ?
                                                 list.Size.Width : list.Size.Height)
@@ -133,7 +136,7 @@ namespace Tizen.NUI.Components
             {
                 RecycleItem item = Container.Children[i] as RecycleItem;
 
-                if (previousItem != null)
+                if (previousItem != null && item != null)
                 {
                     item.Position = LayoutOrientation == Orientation.Vertical ?
                         new Position(
@@ -204,10 +207,13 @@ namespace Tizen.NUI.Components
                     for (int i = 0; i < itemInGroup; i++)
                     {
                         RecycleItem target = Container.Children[0] as RecycleItem;
-                        target.DataIndex = target.DataIndex + Container.Children.Count;
-                        target.SiblingOrder = Container.Children.Count - 1;
+                        if (target != null)
+                        {
+                            target.DataIndex = target.DataIndex + Container.Children.Count;
+                            target.SiblingOrder = Container.Children.Count - 1;
 
-                        result.Add(target);
+                            result.Add(target);
+                        }
                     }
                 }
             }
@@ -220,16 +226,18 @@ namespace Tizen.NUI.Components
                     for (int i = 0; i < itemInGroup; i++)
                     {
                         RecycleItem prevFirstItem = Container.Children[itemInGroup] as RecycleItem;
-
                         RecycleItem target = Container.Children[Container.Children.Count - 1] as RecycleItem;
-                        target.Position = new Position(
-                            LayoutOrientation == Orientation.Vertical ? (prevFirstItem.Position.X - target.Size.Width) : prevFirstItem.Position.X,
-                            LayoutOrientation == Orientation.Vertical ? prevFirstItem.Position.Y : (prevFirstItem.Position.Y - target.Size.Height)
-                        );
-                        target.DataIndex = target.DataIndex - Container.Children.Count;
-                        target.SiblingOrder = 0;
-
-                        result.Add(target);
+                        if (prevFirstItem != null && target != null)
+                        {
+                            target.Position = new Position(
+                                LayoutOrientation == Orientation.Vertical ? (prevFirstItem.Position.X - target.Size.Width) : prevFirstItem.Position.X,
+                                LayoutOrientation == Orientation.Vertical ? prevFirstItem.Position.Y : (prevFirstItem.Position.Y - target.Size.Height)
+                            );
+                            target.DataIndex = target.DataIndex - Container.Children.Count;
+                            target.SiblingOrder = 0;
+
+                            result.Add(target);
+                        }
                     }
                 }
             }
@@ -284,7 +292,7 @@ namespace Tizen.NUI.Components
             if(targetSibling > -1 && targetSibling < Container.Children.Count)
             {
                 RecycleItem candidate = Container.Children[targetSibling] as RecycleItem;
-                if(candidate.DataIndex >= 0 && candidate.DataIndex < DataCount)
+                if(candidate != null && candidate.DataIndex >= 0 && candidate.DataIndex < DataCount)
                 {
                     nextFocusedView = candidate;
                 }
old mode 100644 (file)
new mode 100755 (executable)
index 1cb35b9..0c7627e
@@ -35,6 +35,10 @@ namespace Tizen.NUI.Components
         {
             bool result = false;
             View list = Container.GetParent() as View;
+            if (list == null)
+            {
+                return result;
+            }
 
             Vector2 visibleArea = new Vector2( Math.Abs(scrollPosition), 
                 Math.Abs(scrollPosition) + (LayoutOrientation == Orientation.Horizontal?
@@ -71,7 +75,7 @@ namespace Tizen.NUI.Components
             {
                 RecycleItem item = Container.Children[i] as RecycleItem;
 
-                if(previousItem != null)
+                if(previousItem != null && item != null)
                 {
                     item.Position = LayoutOrientation == Orientation.Horizontal?
                         new Position(
@@ -137,10 +141,13 @@ namespace Tizen.NUI.Components
                 {
                     // Too many item is in front!!! move first item to back!!!!
                     RecycleItem target = Container.Children[0] as RecycleItem;
-                    target.DataIndex = target.DataIndex + Container.Children.Count;
-                    target.SiblingOrder = Container.Children.Count - 1;
+                    if (target != null)
+                    {
+                        target.DataIndex = target.DataIndex + Container.Children.Count;
+                        target.SiblingOrder = Container.Children.Count - 1;
 
-                    result.Add(target);
+                        result.Add(target);
+                    }
                 }
             }
             else
@@ -148,16 +155,18 @@ namespace Tizen.NUI.Components
                 if(lastVisibleItemIndex < Container.Children.Count - 3)
                 {
                     RecycleItem prevFirstItem = Container.Children[0] as RecycleItem;
-
                     RecycleItem target = Container.Children[Container.Children.Count - 1] as RecycleItem;
-                    target.Position = new Position(
-                        LayoutOrientation == Orientation.Horizontal ? (prevFirstItem.Position.X - target.Size.Width) : prevFirstItem.Position.X,
-                        LayoutOrientation == Orientation.Horizontal ? prevFirstItem.Position.Y : (prevFirstItem.Position.Y - target.Size.Height)
-                    );
-                    target.DataIndex = target.DataIndex - Container.Children.Count;
-                    target.SiblingOrder = 0;
-
-                    result.Add(target);
+                    if (prevFirstItem != null && target != null)
+                    {
+                        target.Position = new Position(
+                            LayoutOrientation == Orientation.Horizontal ? (prevFirstItem.Position.X - target.Size.Width) : prevFirstItem.Position.X,
+                            LayoutOrientation == Orientation.Horizontal ? prevFirstItem.Position.Y : (prevFirstItem.Position.Y - target.Size.Height)
+                        );
+                        target.DataIndex = target.DataIndex - Container.Children.Count;
+                        target.SiblingOrder = 0;
+
+                        result.Add(target);
+                    }
                 }
             }
 
@@ -210,7 +219,7 @@ namespace Tizen.NUI.Components
             if(targetSibling > -1 && targetSibling < Container.Children.Count)
             {
                 RecycleItem candidate = Container.Children[targetSibling] as RecycleItem;
-                if(candidate.DataIndex >= 0 && candidate.DataIndex < DataCount)
+                if(candidate != null && candidate.DataIndex >= 0 && candidate.DataIndex < DataCount)
                 {
                     nextFocusedView = candidate;
                 }
old mode 100644 (file)
new mode 100755 (executable)
index cf4a989..2f3daab
@@ -272,7 +272,10 @@ namespace Tizen.NUI.Components
             else
             {
                 // If this is not first focus, request next focus to LayoutManager
-                nextFocusedView = LayoutManager.RequestNextFocusableView(currentFocusedView, direction, loopEnabled);
+                if (LayoutManager != null)
+                {
+                    nextFocusedView = LayoutManager.RequestNextFocusableView(currentFocusedView, direction, loopEnabled);
+                }       
             }
 
             if (nextFocusedView)
@@ -316,8 +319,11 @@ namespace Tizen.NUI.Components
                 }
 
                 focusedView = nextFocusedView;
-                prevFocusedDataIndex = (nextFocusedView as RecycleItem).DataIndex;
-
+                if ((nextFocusedView as RecycleItem) != null)
+                {
+                    prevFocusedDataIndex = (nextFocusedView as RecycleItem).DataIndex;
+                }
+                
                 ScrollTo(targetPosition, true);
             }
             else
index dbbebf4..f2d8869 100755 (executable)
@@ -123,7 +123,7 @@ namespace Tizen.NUI.Components
 
                 Direction scrollingDirection = Direction.Vertical;
                 ScrollableBase scrollableBase = this.Owner as ScrollableBase;
-                if (scrollableBase)
+                if (scrollableBase != null)
                 {
                     scrollingDirection = scrollableBase.ScrollingDirection;
                 }
index 0e77746..d1ebc4e 100755 (executable)
@@ -169,7 +169,10 @@ namespace Tizen.NUI.Components
                 return;
             }
 
-            ThemeMap[key].AddStyleWithoutClone(component.FullName, (Activator.CreateInstance(style) as StyleBase).GetViewStyle());
+            if (Activator.CreateInstance(style) as StyleBase != null)
+            {
+                ThemeMap[key].AddStyleWithoutClone(component.FullName, (Activator.CreateInstance(style) as StyleBase).GetViewStyle());
+            }          
         }
 
         /// <summary>
old mode 100644 (file)
new mode 100755 (executable)
index 3d472ae..76e12a8
@@ -75,6 +75,11 @@ namespace Tizen.NUI.Wearable
         public override void Layout(float scrollPosition)
         {
             RecycleItem centerItem = Container.Children[FocusedIndex] as RecycleItem;
+            if (centerItem == null)
+            {
+                return;
+            }
+
             float centerItemPosition = LayoutOrientation == Orientation.Horizontal ? centerItem.Position.X : centerItem.Position.Y;
 
             Vector2 stepRange = new Vector2(-scrollPosition - StepSize + 1.0f, -scrollPosition + StepSize - 1.0f);
@@ -106,6 +111,10 @@ namespace Tizen.NUI.Wearable
             for (int i = FocusedIndex - 1; i > -1; i--)
             {
                 RecycleItem target = Container.Children[i] as RecycleItem;
+                if (target == null)
+                {
+                    continue;
+                }
 
                 float prevItemPosition = LayoutOrientation == Orientation.Horizontal ? prevItem.Position.X : prevItem.Position.Y;
                 float prevItemSize = (LayoutOrientation == Orientation.Horizontal ? prevItem.Size.Width : prevItem.Size.Height);
@@ -140,6 +149,10 @@ namespace Tizen.NUI.Wearable
             for (int i = FocusedIndex + 1; i < Container.Children.Count; i++)
             {
                 RecycleItem target = Container.Children[i] as RecycleItem;
+                if (target == null)
+                {
+                    continue;
+                }
 
                 float prevItemPosition = LayoutOrientation == Orientation.Horizontal ? prevItem.Position.X : prevItem.Position.Y;
                 float prevItemSize = (LayoutOrientation == Orientation.Horizontal ? prevItem.Size.Width : prevItem.Size.Height);
@@ -194,30 +207,34 @@ namespace Tizen.NUI.Wearable
             if (!isBack && FocusedIndex < 6)
             {
                 RecycleItem target = Container.Children[Container.Children.Count - 1] as RecycleItem;
+                if (target != null)
+                {
+                    int previousSiblingOrder = target.SiblingOrder;
+                    target.SiblingOrder = 0;
+                    target.DataIndex = target.DataIndex - Container.Children.Count;
+                    target.Position = new Position(0, Math.Abs(scrollPosition) - 360);
+                    target.Scale = new Vector3(0, 0, 0);
 
-                int previousSiblingOrder = target.SiblingOrder;
-                target.SiblingOrder = 0;
-                target.DataIndex = target.DataIndex - Container.Children.Count;
-                target.Position = new Position(0, Math.Abs(scrollPosition) - 360);
-                target.Scale = new Vector3(0, 0, 0);
-
-                result.Add(target);
+                    result.Add(target);
 
-                FocusedIndex++;
+                    FocusedIndex++;
+                }
             }
             else if (isBack && FocusedIndex > 8)
             {
                 RecycleItem target = Container.Children[0] as RecycleItem;
+                if (target != null)
+                {
+                    int previousSiblingOrder = target.SiblingOrder;
+                    target.SiblingOrder = Container.Children.Count - 1;
+                    target.DataIndex = target.DataIndex + Container.Children.Count;
+                    target.Position = new Position(0, Math.Abs(scrollPosition) + 360);
+                    target.Scale = new Vector3(0, 0, 0);
 
-                int previousSiblingOrder = target.SiblingOrder;
-                target.SiblingOrder = Container.Children.Count - 1;
-                target.DataIndex = target.DataIndex + Container.Children.Count;
-                target.Position = new Position(0, Math.Abs(scrollPosition) + 360);
-                target.Scale = new Vector3(0, 0, 0);
-
-                result.Add(target);
+                    result.Add(target);
 
-                FocusedIndex--;
+                    FocusedIndex--;
+                }
             }
 
             PrevScrollPosition = scrollPosition;
index 8d844c6..c7217fa 100755 (executable)
@@ -530,11 +530,11 @@ namespace Tizen.NUI.Wearable
             if (!(selectOutIndicator is ImageVisual visual)) return;
             if (isCurrentIndicatorCentered)
             {
-                visual.URL = circularPaginationStyle.CenterIndicatorImageURL.Normal;
+                visual.URL = circularPaginationStyle?.CenterIndicatorImageURL?.Normal;
             }
             else
             {
-                visual.URL = circularPaginationStyle.IndicatorImageURL.Normal;
+                visual.URL = circularPaginationStyle?.IndicatorImageURL?.Normal;
             }
             visual.Opacity = 0.5f;
         }
@@ -551,11 +551,11 @@ namespace Tizen.NUI.Wearable
             if (!(selectInIndicator is ImageVisual visual)) return;
             if (isCurrentIndicatorCentered)
             {
-                visual.URL = circularPaginationStyle.CenterIndicatorImageURL.Selected;
+                visual.URL = circularPaginationStyle?.CenterIndicatorImageURL?.Selected;
             }
             else
             {
-                visual.URL = circularPaginationStyle.IndicatorImageURL.Selected;
+                visual.URL = circularPaginationStyle?.IndicatorImageURL?.Selected;
             }
             visual.Opacity = 1.0f;
         }
@@ -629,14 +629,14 @@ namespace Tizen.NUI.Wearable
         // The parameter, index, is for the index of either oddArray or evenArray.
         private void CreateIndicator(int index)
         {
-            if (circularPaginationStyle == null)
+            if (circularPaginationStyle == null || circularPaginationStyle.IndicatorSize == null)
             {
                 return;
             }
 
             ImageVisual indicator = new ImageVisual
             {
-                URL = circularPaginationStyle.IndicatorImageURL.Normal,
+                URL = circularPaginationStyle.IndicatorImageURL?.Normal,
                 Size = new Size2D((int)circularPaginationStyle.IndicatorSize.Width, (int)circularPaginationStyle.IndicatorSize.Height),
                 Opacity = 0.5f,
             };
@@ -670,7 +670,7 @@ namespace Tizen.NUI.Wearable
 
         private void UpdateContainer()
         {
-            if (circularPaginationStyle == null)
+            if (circularPaginationStyle == null || circularPaginationStyle.IndicatorSize == null || container == null)
             {
                 return;
             }
old mode 100644 (file)
new mode 100755 (executable)
index a993e0b..a7f4c32
@@ -95,6 +95,11 @@ namespace Tizen.NUI.Wearable
         /// This may be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API
         public void SetFocus(int dataIndex, bool animated)
         {
+            if (LayoutManager == null)
+            {
+                return;
+            }
+
             foreach (RecycleItem item in Children)
             {
                 if (item.DataIndex == dataIndex)
@@ -121,11 +126,19 @@ namespace Tizen.NUI.Wearable
         /// This may be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API
         protected override void OnPreReachedTargetPosition(float targetPosition)
         {
+            if (LayoutManager == null)
+            {
+                return;
+            }
             int targetDataIndex = (int)Math.Round(Math.Abs(targetPosition) / LayoutManager.StepSize);
 
             for (int i = 0; i < Children.Count; i++)
             {
                 RecycleItem item = Children[i] as RecycleItem;
+                if (item == null)
+                {
+                    continue;
+                }
 
                 if (targetDataIndex == item.DataIndex)
                 {
old mode 100644 (file)
new mode 100755 (executable)
index 1c27c9a..8633678
@@ -76,13 +76,19 @@ namespace Tizen.NUI
                 {
                     // parent1 is in DefaultLayer.
                     Layer comparison2AsLayer = comparison2 as Layer;
-                    result = comparison2AsLayer.Depth > NUIApplication.GetDefaultWindow().GetDefaultLayer().Depth;
+                    if(comparison2AsLayer != null)
+                    {
+                        result = comparison2AsLayer.Depth > NUIApplication.GetDefaultWindow().GetDefaultLayer().Depth;
+                    }   
                 }
                 else
                 {
                     // parent2 is in DefaultLayer.
                     Layer comparison1AsLayer = comparison1 as Layer;
-                    result = NUIApplication.GetDefaultWindow().GetDefaultLayer().Depth < comparison1AsLayer.Depth;
+                    if (comparison1AsLayer != null)
+                    {
+                        result = NUIApplication.GetDefaultWindow().GetDefaultLayer().Depth < comparison1AsLayer.Depth;
+                    }
                 }
             }
             else
@@ -97,8 +103,10 @@ namespace Tizen.NUI
                         // Compare Depth
                         Layer comparison1AsLayer = comparison1 as Layer;
                         Layer comparison2AsLayer = comparison2 as Layer;
-
-                        result = comparison1AsLayer.Depth < comparison2AsLayer.Depth;
+                        if (comparison1AsLayer != null && comparison2AsLayer != null)
+                        {
+                            result = comparison1AsLayer.Depth < comparison2AsLayer.Depth;
+                        }          
                     }
                     else
                     {
@@ -106,8 +114,10 @@ namespace Tizen.NUI
                         // Compare SiblingOrder
                         View comparison1AsView = comparison1 as View;
                         View comparison2AsView = comparison2 as View;
-
-                        result = comparison1AsView.SiblingOrder < comparison2AsView.SiblingOrder;
+                        if (comparison1AsView != null && comparison2AsView != null)
+                        {
+                            result = comparison1AsView.SiblingOrder < comparison2AsView.SiblingOrder;
+                        }                    
                     }
                 }
                 else
index a4f2684..67fea42 100755 (executable)
@@ -38,7 +38,7 @@ namespace Tizen.NUI
             string result = value.ToString();
             FieldInfo info = typeof(T).GetField(result);
             var attributes = info.GetCustomAttributes(typeof(DescriptionAttribute), true);
-            if (null != attributes?.FirstOrDefault())
+            if (null != attributes?.FirstOrDefault() && (attributes.First() as DescriptionAttribute) != null)
             {
                 result = (attributes.First() as DescriptionAttribute).Description;
             }
index 269d4af..06fde1c 100755 (executable)
@@ -81,7 +81,7 @@ namespace Tizen.NUI
             if (layoutParent != null)
             {
                  LayoutGroup layoutGroup =  layoutParent as LayoutGroup;
-                 if(layoutGroup.LayoutRequested)
+                 if(layoutGroup != null && !layoutGroup.LayoutRequested)
                  {
                     layoutGroup.RequestLayout();
                  }
@@ -184,7 +184,7 @@ namespace Tizen.NUI
                 Size2D rootSize;
                 Position2D rootPosition = root.Position2D;
                 View parentView = parentNode as View;
-                if (parentView)
+                if (parentView != null)
                 {
                     // Get parent View's Size.  If using Legacy size negotiation then should have been set already.
                     rootSize = new Size2D(parentView.Size2D.Width, parentView.Size2D.Height);
@@ -263,7 +263,7 @@ namespace Tizen.NUI
             for (uint layerIndex = 0; layerIndex < numberOfLayers; layerIndex++)
             {
                 Layer layer = _window.GetLayer(layerIndex);
-                if (layer)
+                if (layer != null)
                 {
                     for (uint i = 0; i < layer.ChildCount; i++)
                     {
index 42be51c..894727d 100755 (executable)
@@ -92,7 +92,7 @@ namespace Tizen.NUI
             // we add 1000, just incase View class starts using animatable properties
             int startAnimatablePropertyIndex = (int)Tizen.NUI.PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + maxCountPerDerivation;
 
-            while (viewType.GetTypeInfo().BaseType.Name != "CustomView")   // custom view is our C# view base class. we don't go any deeper.
+            while (viewType.GetTypeInfo().BaseType?.Name != "CustomView")   // custom view is our C# view base class. we don't go any deeper.
             {
                 // for every base class increase property start index
                 startEventPropertyIndex += (int)Tizen.NUI.PropertyRanges.DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION; // DALi uses 10,000
index 680602f..870caa8 100755 (executable)
@@ -122,6 +122,11 @@ namespace Tizen.NUI
 
         public static System.IntPtr WidgetCreateFunction(ref string widgetName)
         {
+            if ((Instance as WidgetApplication) == null)
+            {
+                return IntPtr.Zero;
+            }
+
             Dictionary<System.Type, string> widgetInfo = (Instance as WidgetApplication).WidgetInfo;
 
             foreach (System.Type widgetType in widgetInfo.Keys)
@@ -129,7 +134,7 @@ namespace Tizen.NUI
                 if (widgetInfo[widgetType] == widgetName)
                 {
                     Widget widget = Activator.CreateInstance(widgetType) as Widget;
-                    if (widget)
+                    if (widget != null)
                     {
                         return widget.GetIntPtr();
                     }
index ca83712..895c0c3 100755 (executable)
@@ -304,7 +304,7 @@ namespace Tizen.NUI.Binding
 #endif
 
                 if (property == null) //is the indexer defined on the base class?
-                    property = sourceType.BaseType.GetProperty(indexerName);
+                    property = sourceType.BaseType?.GetProperty(indexerName);
                 if (property == null) //is the indexer defined on implemented interface ?
                 {
                     foreach (var implementedInterface in sourceType.ImplementedInterfaces)
index 69d92a5..7c2469b 100755 (executable)
@@ -125,6 +125,10 @@ namespace Tizen.NUI.Binding
         void RegisterImplicitStyles()
         {
             Type type = TargetType;
+            if (type == null)
+            {
+                return;
+            }
             while (true) {
                 BindableProperty implicitStyleProperty = BindableProperty.Create(nameof(ImplicitStyle), typeof(Style), typeof(View), default(Style),
                         propertyChanged: (bindable, oldvalue, newvalue) => OnImplicitStyleChanged());
index d043366..b3ccc94 100755 (executable)
@@ -569,6 +569,12 @@ namespace Tizen.NUI
         {
             // We need to measure child layout
             View child = Registry.GetManagedBaseHandleFromNativePtr(childPtr) as View;
+            if (child == null)
+            {
+                measureSize.width = 0;
+                measureSize.height = 0;
+                return;
+            }
 
             LayoutItem childLayout = child.Layout;
 
index 7470bce..17aa496 100755 (executable)
@@ -309,7 +309,7 @@ namespace Tizen.NUI
             if (Parent != null)
             {
                  LayoutGroup layoutGroup =  Parent as LayoutGroup;
-                 if(layoutGroup.LayoutRequested)
+                 if(layoutGroup != null && !layoutGroup.LayoutRequested)
                  {
                     layoutGroup.RequestLayout();
                  }
@@ -558,10 +558,13 @@ namespace Tizen.NUI
                 }
                 else
                 {
-                    Owner.SetSize(right - left, bottom - top, Owner.Position.Z);
-                    if(SetPositionByLayout)
+                    if (Owner.Position != null)
                     {
-                        Owner.SetPosition(left, top, Owner.Position.Z);
+                        Owner.SetSize(right - left, bottom - top, Owner.Position.Z);
+                        if (SetPositionByLayout)
+                        {
+                            Owner.SetPosition(left, top, Owner.Position.Z);
+                        }
                     }
                 }
 
index e9d577b..9de0008 100755 (executable)
@@ -37,7 +37,7 @@ namespace Tizen.NUI
         public override IWindowInfo CreateWindowInfo()
         {
             ComponentApplication instance = ComponentApplication.Instance as ComponentApplication;
-            if (instance)
+            if (instance != null)
             {
                 if (!defaultWindowSet)
                 {