From e41e4816274c729a09f2d763d31248d6693c7c95 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Fri, 5 Jul 2019 21:19:16 +0900 Subject: [PATCH] Fix NUI SetCustomAlgorithm crash Change-Id: Iae847c59830d94ef853983511d744d36e59eec0e Signed-off-by: dongsug.song --- dali-csharp-binder/src/dali_wrap.cpp | 3 ++- dali-csharp-binder/src/flex-layout.cpp | 7 ++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/dali-csharp-binder/src/dali_wrap.cpp b/dali-csharp-binder/src/dali_wrap.cpp index 1b4b8de..cd97afd 100755 --- a/dali-csharp-binder/src/dali_wrap.cpp +++ b/dali-csharp-binder/src/dali_wrap.cpp @@ -476,6 +476,7 @@ void SWIG_CSharpException(int code, const char *msg) { #include #include "web-view-signal-converter.h" +#include // add here SWIG version check @@ -2567,7 +2568,7 @@ Dali::Actor SwigDirector_CustomAlgorithmInterface::GetNextFocusableActor(Dali::A jdirection = (int)direction; jresult = (void *) swig_callbackGetNextFocusableActor(jcurrent, jproposed, jdirection); if (!jresult) { - SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Unexpected null return for type Dali::Actor", 0); + DALI_LOG_ERROR("[ERROR][%s line:%d] Unexpected null return for type Dali::Actor! Next focus will be NULL, please be cautious to handle the keyboard foucs! ", __FILE__, __LINE__); return c_result; } c_result = *(Dali::Actor *)jresult; diff --git a/dali-csharp-binder/src/flex-layout.cpp b/dali-csharp-binder/src/flex-layout.cpp index e39eb0a..cfd5d2e 100755 --- a/dali-csharp-binder/src/flex-layout.cpp +++ b/dali-csharp-binder/src/flex-layout.cpp @@ -12,9 +12,7 @@ extern "C" { SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_FlexLayout_New() { - void * jresult ; - Dali::Toolkit::Flex::Node* result; - + Dali::Toolkit::Flex::Node* result = (Dali::Toolkit::Flex::Node*)0; { try { result = new Dali::Toolkit::Flex::Node(); @@ -32,8 +30,7 @@ SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_FlexLayout_New() }; } } - jresult = (void *)result; - return result; + return (void *)result; } -- 2.7.4