diff --git a/macos/src/main/objcpp/DarkMode.mm b/macos/src/main/objcpp/DarkMode.mm index 25f33d1f..fc115abf 100644 --- a/macos/src/main/objcpp/DarkMode.mm +++ b/macos/src/main/objcpp/DarkMode.mm @@ -171,13 +171,15 @@ BOOL isDarkModeMojave() { if ([name containsString:@"jetbrains"]) { CFStringRef bundleName = (__bridge CFStringRef)name; - Boolean = false; + Boolean exists = false; CFPreferencesGetAppBooleanValue(NSRequiresAquaSystemAppearance, bundleName, &exists); isPatched = exists ? YES : NO; CFPreferencesSetAppValue(NSRequiresAquaSystemAppearance, kCFBooleanFalse, bundleName); CFPreferencesAppSynchronize(bundleName); } + } else { + isPatched = false; } JNF_COCOA_EXIT(env); }