diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index e7e47a6bf38..25e60002de0 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -145,11 +145,9 @@ init( GHOST_TSuccess success = GHOST_System::init(); if (success) { - m_keyboard_vector = new char[32]; - m_displayManager = new GHOST_DisplayManagerX11(this); - if (m_keyboard_vector && m_displayManager) { + if (m_displayManager) { return GHOST_kSuccess; } } @@ -672,9 +670,9 @@ getModifierKeys( // analyse the masks retuned from XQueryPointer. - memset(m_keyboard_vector,0,sizeof(m_keyboard_vector)); + memset((void *)m_keyboard_vector,0,sizeof(m_keyboard_vector)); - XQueryKeymap(m_display,m_keyboard_vector); + XQueryKeymap(m_display,(char *)m_keyboard_vector); // now translate key symobols into keycodes and // test with vector. diff --git a/intern/ghost/intern/GHOST_SystemX11.h b/intern/ghost/intern/GHOST_SystemX11.h index 6a2c81c09a7..58017bd2392 100644 --- a/intern/ghost/intern/GHOST_SystemX11.h +++ b/intern/ghost/intern/GHOST_SystemX11.h @@ -246,7 +246,7 @@ private : GHOST_TUns64 m_start_time; /// A vector of keyboard key masks - char *m_keyboard_vector; + char m_keyboard_vector[32]; /** * Return the ghost window associated with the