Fix Svace warning issue 57/76757/1
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Tue, 21 Jun 2016 07:22:48 +0000 (16:22 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 27 Jun 2016 06:57:04 +0000 (15:57 +0900)
- Initialized local variable at tizen-video-player.cpp
- prevention of Null pointer dereference at seat.cpp

Change-Id: I9f83ae209856dba832744e6bca1f498ed71ee908

adaptors/wayland/input/seat.cpp
packaging/dali-adaptor.spec
plugins/video-player/tizen-video-player.cpp

index added93..0efb9d1 100644 (file)
@@ -219,11 +219,18 @@ void Seat::SetPointerPosition( Dali::Vector2 position)
 void Seat::KeyboardKeymap( unsigned int format, int fd, unsigned int size )
 {
 
-  if(!mXkbData.mContext )
+  if( !mXkbData.mContext )
   {
     mXkbData.mContext = xkb_context_new( XKB_CONTEXT_NO_FLAGS );
   }
 
+  if( !mXkbData.mContext )
+  {
+    DALI_LOG_ERROR("xkb_context_new failed");
+    close(fd);
+    return;
+  }
+
   // current formats defined in wayland-client-protocol.h
   // WL_KEYBOARD_KEYMAP_FORMAT_NO_KEYMAP =0, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1=1
 
index 45d0e10..2644907 100644 (file)
@@ -63,8 +63,8 @@ BuildRequires:  pkgconfig(appcore-watch)
 %if "%{profile}" == "common"
 %define dali_profile COMMON
 %define dali_feedback_plugin 0
-%define dali_videoplayer_plugin 0
-%define tizen_2_2_compatibility 1
+%define dali_videoplayer_plugin 1
+%define tizen_2_2_compatibility 0
 %define shaderbincache_flag DISABLE
 BuildRequires:  pkgconfig(glesv2)
 %define gles_requirement_setup 1
index 812a274..5429867 100644 (file)
@@ -491,7 +491,7 @@ Dali::VideoPlayerPlugin::DisplayRotation TizenVideoPlayer::GetDisplayRotation()
   }
 
   int error;
-  player_display_rotation_e rotation;
+  player_display_rotation_e rotation = PLAYER_DISPLAY_ROTATION_NONE;
   if( mPlayerState != PLAYER_STATE_NONE )
   {
     error = player_get_display_rotation( mPlayer, &rotation );