From c46805a3e33f6228d0869ca39e646a6d92040af8 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Mon, 27 Jun 2016 17:13:10 +0900 Subject: [PATCH] [3.0]Change the location of checking NULL of mContext - In devel/master branch, the patch already adjusted Change-Id: If6e8b3441e44ba8df79b81277bc6af73702cfb99 --- adaptors/wayland/input/seat.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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); -- 2.7.4