mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-8173 IntelliJ IDEA with WLToolkit crashes when opening Query Console of a datasource with Umlauts in its name
This commit is contained in:
@@ -355,13 +355,10 @@ FrameSetTitle
|
||||
{
|
||||
if (!frame->xdg_toplevel) return;
|
||||
|
||||
jboolean iscopy = JNI_FALSE;
|
||||
const char *title_c_str = JNU_GetStringPlatformChars(env, title, &iscopy);
|
||||
const char *title_c_str = GetStringUTF8Chars(env, title);
|
||||
if (title_c_str) {
|
||||
xdg_toplevel_set_title(frame->xdg_toplevel, title_c_str);
|
||||
if (iscopy) {
|
||||
JNU_ReleaseStringPlatformChars(env, title, title_c_str);
|
||||
}
|
||||
ReleaseStringUTF8Chars(env, title, title_c_str);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,13 +368,10 @@ FrameSetAppID
|
||||
{
|
||||
if (!frame->xdg_toplevel) return;
|
||||
|
||||
jboolean iscopy = JNI_FALSE;
|
||||
const char *id_c_str = JNU_GetStringPlatformChars(env, appid, &iscopy);
|
||||
const char *id_c_str = GetStringUTF8Chars(env, appid);
|
||||
if (id_c_str) {
|
||||
xdg_toplevel_set_app_id(frame->xdg_toplevel, id_c_str);
|
||||
if (iscopy) {
|
||||
JNU_ReleaseStringPlatformChars(env, appid, id_c_str);
|
||||
}
|
||||
ReleaseStringUTF8Chars(env, appid, id_c_str);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,14 +66,11 @@ JNIEXPORT jlong JNICALL Java_sun_awt_wl_WLToolkit_nativeGetPredefinedCursor
|
||||
if (!cursor_theme)
|
||||
return 0;
|
||||
|
||||
jboolean isCopy = JNI_FALSE;
|
||||
const char *name_c_str = JNU_GetStringPlatformChars(env, name, &isCopy);
|
||||
const char *name_c_str = GetStringUTF8Chars(env, name);
|
||||
if (!name_c_str)
|
||||
return 0;
|
||||
struct wl_cursor *wl_cursor = wl_cursor_theme_get_cursor(cursor_theme, name_c_str);
|
||||
if (isCopy) {
|
||||
JNU_ReleaseStringPlatformChars(env, name, name_c_str);
|
||||
}
|
||||
ReleaseStringUTF8Chars(env, name, name_c_str);
|
||||
|
||||
if (!wl_cursor || !wl_cursor->image_count || !wl_cursor->images[0])
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user