patch [#32282] Fix segfault on exit in IM shutdown.
authorCampbell Barton <ideasman42@gmail.com>
Wed, 8 Aug 2012 07:31:19 +0000 (07:31 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 8 Aug 2012 07:31:19 +0000 (07:31 +0000)
from Bill Currie (taniwha)

intern/ghost/intern/GHOST_SystemX11.cpp

index e8f172f8b1c84603d62c95d25d1f7e61b4601a76..7ac9b0c3c2447545c34a0d19b648edf5d0e39000 100644 (file)
@@ -152,7 +152,9 @@ GHOST_SystemX11::
 ~GHOST_SystemX11()
 {
 #if defined(WITH_X11_XINPUT) && defined(X_HAVE_UTF8_STRING)
-       XCloseIM(m_xim);
+       if (m_xim) {
+               XCloseIM(m_xim);
+       }
 #endif
 
        XCloseDisplay(m_display);