[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 f6827c5d540d5ffa6dfb69945341e627f48d8d65..6bc6d1fad5134c1073abd3d1fd5b8ebb3f71a6dd 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);
             }
         }