[NUI] Fix build warning CA1062 (#2234)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / public / BaseComponents / ViewInternal.cs
index bd71b42..a63b08c 100755 (executable)
@@ -1167,9 +1167,15 @@ namespace Tizen.NUI.BaseComponents
         /// The touch event handler for ControlState.
         /// Please change ControlState value by touch state if needed.
         /// </summary>
+        /// <exception cref="ArgumentNullException"> Thrown when touch is null. </exception>
         [EditorBrowsable(EditorBrowsableState.Never)]
         protected virtual bool HandleControlStateOnTouch(Touch touch)
         {
+            if (touch == null)
+            {
+                throw new global::System.ArgumentNullException(nameof(touch));
+            }
+
             switch (touch.GetState(0))
             {
                 case PointStateType.Down:
@@ -1185,7 +1191,6 @@ namespace Tizen.NUI.BaseComponents
                 default:
                     break;
             }
-
             return false;
         }