From: Seoyeon Kim Date: Mon, 27 Jun 2016 08:13:10 +0000 (+0900) Subject: [3.0]Change the location of checking NULL of mContext X-Git-Tag: accepted/tizen/common/20160629.223331~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c46805a3e33f6228d0869ca39e646a6d92040af8;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git [3.0]Change the location of checking NULL of mContext - In devel/master branch, the patch already adjusted Change-Id: If6e8b3441e44ba8df79b81277bc6af73702cfb99 --- diff --git a/adaptors/wayland/input/seat.cpp b/adaptors/wayland/input/seat.cpp index a8cab4f..0de5ad5 100644 --- a/adaptors/wayland/input/seat.cpp +++ b/adaptors/wayland/input/seat.cpp @@ -224,6 +224,12 @@ void Seat::KeyboardKeymap( unsigned int format, int fd, unsigned int size ) 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 @@ -243,12 +249,6 @@ void Seat::KeyboardKeymap( unsigned int format, int fd, unsigned int size ) return; } - if( !mXkbData.mContext ) - { - DALI_LOG_ERROR("xkb_context_new failed"); - close(fd); - return; - } mXkbData.mKeymap = xkb_map_new_from_string(mXkbData.mContext, map, XKB_KEYMAP_FORMAT_TEXT_V1, XKB_KEYMAP_COMPILE_NO_FLAGS); munmap(map, size);