[NUI] Add Null check in Slider Dispose
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Fri, 8 Apr 2022 05:56:58 +0000 (14:56 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 20 Apr 2022 08:38:08 +0000 (17:38 +0900)
- 'editModeIndicator' of Slider class is not created all the time.
 So, added Null check for this variable.

Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
src/Tizen.NUI.Components/Controls/Slider.cs

index 92e2be8..b1701f1 100755 (executable)
@@ -1651,8 +1651,11 @@ namespace Tizen.NUI.Components
                 this.TouchEvent -= OnTouchEventForTrack;
 
                 recoverIndicator = null;
-                editModeIndicator.Dispose();
-                editModeIndicator = null;
+                if (editModeIndicator != null)
+                {
+                    editModeIndicator.Dispose();
+                    editModeIndicator = null;
+                }
             }
 
             base.Dispose(type);