diff options
author | Lynn Kues | 2002-09-11 20:51:55 +0000 |
---|---|---|
committer | Lynn Kues | 2002-09-11 20:51:55 +0000 |
commit | fc48afa080e04562cf674160174be02f02018709 (patch) | |
tree | 48862a6a0f81c9ebe78e0a1f091730135bcb866d /bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal | |
parent | 59ec4f00380131e3cad977620bc302fe48593baf (diff) | |
download | eclipse.platform.swt-fc48afa080e04562cf674160174be02f02018709.tar.gz eclipse.platform.swt-fc48afa080e04562cf674160174be02f02018709.tar.xz eclipse.platform.swt-fc48afa080e04562cf674160174be02f02018709.zip |
20691
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java index aba2a5793b..39306a62d2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/internal/BidiUtil.java @@ -401,7 +401,7 @@ static int[] getKeyboardLanguageList() { }
/**
* Return whether or not the platform supports a bidi language. Determine this
- * by looking at the languages that are installed for the keyboard.
+ * by looking at the languages that are installed.
* <p>
*
* @return true if bidi is supported, false otherwise. Always
@@ -412,14 +412,16 @@ public static boolean isBidiPlatform() { if (isBidiPlatform != -1) return isBidiPlatform == 1; // already set
isBidiPlatform = 0;
- Callback callback;
+ Callback callback = null;
try {
callback = new Callback (Class.forName (CLASS_NAME), "EnumSystemLanguageGroupsProc", 5);
int lpEnumSystemLanguageGroupsProc = callback.getAddress ();
if (lpEnumSystemLanguageGroupsProc == 0) SWT.error(SWT.ERROR_NO_MORE_CALLBACKS);
OS.EnumSystemLanguageGroups(lpEnumSystemLanguageGroupsProc, OS.LGRPID_INSTALLED, 0);
callback.dispose ();
- } catch (ClassNotFoundException e) {}
+ } catch (ClassNotFoundException e) {
+ if (callback != null) callback.dispose();
+ }
if (isBidiPlatform == 1) return true;
// need to look at system code page for NT & 98 platforms since EnumSystemLanguageGroups is
// not supported for these platforms
|