From: Seoyeon Kim Date: Wed, 6 Jul 2016 04:15:56 +0000 (+0900) Subject: Fix Svace issue X-Git-Tag: accepted/tizen/3.0/ivi/20161011.055323^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=7daf1d9ebe753631b98b4c241b0a1c9c5226fcd3;p=platform%2Fcore%2Fuifw%2Fpepper-dali.git Fix Svace issue - Return value of 'wl_resource_create' function is dereferenced at line 290 Change-Id: Iaf60d5caca318ed0d994cf95af1efdad1a8569aa --- diff --git a/pepper-dali/internal/shell-client-impl.cpp b/pepper-dali/internal/shell-client-impl.cpp index f57ee5a..8531355 100644 --- a/pepper-dali/internal/shell-client-impl.cpp +++ b/pepper-dali/internal/shell-client-impl.cpp @@ -271,6 +271,11 @@ void ShellClient::GetSurface( wl_client* client, unsigned int id, wl_resource* s mSurface = static_cast< pepper_surface_t* >( wl_resource_get_user_data( surfaceResource ) ); mSurfaceResource = wl_resource_create( client, &xdg_surface_interface, 1, id ); + if( !mSurfaceResource ) + { + DALI_LOG_INFO( gPepperShellClientLogging, Debug::General, "ShellClient::GetSurface: wl_resource_create is failed\n" ); + return; + } mView = pepper_compositor_add_view( static_cast< pepper_compositor_t* >( Pepper::GetImplementation( mCompositor ).GetCompositorHandle() ) ); if( !mView )