Linux: Don't free already freed XIC and XIM instances in LinuxKeyboard

This commit is contained in:
Elias Naur 2006-07-31 01:22:33 +00:00
parent 84600dffdb
commit 552b7ca3fc
1 changed files with 4 additions and 2 deletions

View File

@ -144,8 +144,10 @@ final class LinuxKeyboard {
private static native ByteBuffer allocateComposeStatus();
public void destroy() {
destroyIC(xic);
closeIM(xim);
if (xic != 0)
destroyIC(xic);
if (xim != 0)
closeIM(xim);
}
private static native void destroyIC(long xic);
private static native void closeIM(long xim);