fix crash when macos_titlebar_color=background with transparent background

This commit is contained in:
zhaolei 2026-02-24 18:06:53 +08:00
parent ced3a98aa8
commit 31b4614c87

View file

@ -3711,7 +3711,6 @@ void clear_title_bar_background_views(NSWindow *window) {
if (!window->ns.titlebar_hidden && window->decorated && tc.was_set && window->ns.last_applied_titlebar_settings.transparent) {
NSColor *titlebar_color = [NSColor colorWithSRGBRed:tc.red green:tc.green blue:tc.blue alpha:tc.alpha];
set_title_bar_background(nsw, titlebar_color);
[titlebar_color release];
} else clear_title_bar_background_views(nsw);
#undef tc
}
@ -4239,4 +4238,3 @@ - (void)filePromiseProvider:(NSFilePromiseProvider*)filePromiseProvider
}
return 0;
}