From: huiyu.eun Date: Mon, 9 Apr 2018 04:15:10 +0000 (+0900) Subject: Fix coverity issue X-Git-Tag: submit/tizen/20180409.102708~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=16e7a8e77d1200708c85045c60499c22087b612e;p=platform%2Fcore%2Fuifw%2Fdali-csharp-binder.git Fix coverity issue : Passing null pointer darg, which dereferences it. (The dereference happens because this is a virtual function call.) Change-Id: I317395b4c351ab2f23dfc662be4ad2ff85a140d9 Signed-off-by: huiyu.eun --- diff --git a/dali-csharp-binder/src/dali_wrap.cpp b/dali-csharp-binder/src/dali_wrap.cpp index 5781d3d5..a290bd2f 100755 --- a/dali-csharp-binder/src/dali_wrap.cpp +++ b/dali-csharp-binder/src/dali_wrap.cpp @@ -64350,7 +64350,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnStageConnection(void * jarg1, darg = dynamic_cast(arg1); { try { - (darg)->OnStageConnection(arg2); + if(darg) { + (darg)->OnStageConnection(arg2); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; @@ -64383,7 +64385,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnStageConnectionSwigExplicitVi darg = dynamic_cast(arg1); { try { - (darg)->OnStageConnectionSwigPublic(arg2); + if(darg) { + (darg)->OnStageConnectionSwigPublic(arg2); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; @@ -64414,7 +64418,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnStageDisconnection(void * jar darg = dynamic_cast(arg1); { try { - (darg)->OnStageDisconnection(); + if(darg) { + (darg)->OnStageDisconnection(); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; @@ -64445,7 +64451,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnStageDisconnectionSwigExplici darg = dynamic_cast(arg1); { try { - (darg)->OnStageDisconnectionSwigPublic(); + if(darg) { + (darg)->OnStageDisconnectionSwigPublic(); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; @@ -64482,7 +64490,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnChildAdd(void * jarg1, void * darg = dynamic_cast(arg1); { try { - (darg)->OnChildAdd(*arg2); + if(darg) { + (darg)->OnChildAdd(*arg2); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; @@ -64519,7 +64529,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnChildAddSwigExplicitViewImpl( darg = dynamic_cast(arg1); { try { - (darg)->OnChildAddSwigPublic(*arg2); + if(darg) { + (darg)->OnChildAddSwigPublic(*arg2); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; @@ -64556,7 +64568,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnChildRemove(void * jarg1, voi darg = dynamic_cast(arg1); { try { - (darg)->OnChildRemove(*arg2); + if(darg) { + (darg)->OnChildRemove(*arg2); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ; @@ -64593,7 +64607,9 @@ SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ViewImpl_OnChildRemoveSwigExplicitViewIm darg = dynamic_cast(arg1); { try { - (darg)->OnChildRemoveSwigPublic(*arg2); + if(darg) { + (darg)->OnChildRemoveSwigPublic(*arg2); + } } catch (std::out_of_range& e) { { SWIG_CSharpException(SWIG_IndexError, const_cast(e.what())); return ;