[NUI] Fix ICustomFocusAlgorithm exception (#1182)
authordongsug-song <35130733+dongsug-song@users.noreply.github.com>
Fri, 13 Dec 2019 03:17:37 +0000 (12:17 +0900)
committerGitHub <noreply@github.com>
Fri, 13 Dec 2019 03:17:37 +0000 (12:17 +0900)
src/Tizen.NUI/src/public/FocusManager.cs

index f6827c5..6bc6d1f 100755 (executable)
@@ -775,6 +775,11 @@ namespace Tizen.NUI
 
             public override View GetNextFocusableView(View current, View proposed, View.FocusDirection direction)
             {
+                if(_customFocusAlgorithm == null)
+                {
+                    Tizen.Log.Error("NUI", $"[ERROR] User defined ICustomFocusAlgorithm interface class becomes unreachable. Null will be proposed for next focusing!");
+                    return null;
+                }
                 return _customFocusAlgorithm.GetNextFocusableView(current, proposed, direction);
             }
         }