summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--installer-downloader/src/cacao_impl/ui.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/installer-downloader/src/cacao_impl/ui.rs b/installer-downloader/src/cacao_impl/ui.rs
index f65dc6ae2a..1e031761e8 100644
--- a/installer-downloader/src/cacao_impl/ui.rs
+++ b/installer-downloader/src/cacao_impl/ui.rs
@@ -42,6 +42,9 @@ static BANNER_COLOR: LazyLock<Color> = LazyLock::new(|| {
// Maybe using calibrated colors is more correct? Rendering different colors *definitely*
// is not.
let id =
+ // SAFETY: This function returns a pointer to a refcounted NSColor instance, and panics if
+ // a null pointer is passed.
+ // See https://developer.apple.com/documentation/appkit/nscolor/init(red:green:blue:alpha:)?language=objc
unsafe { Id::from_retained_ptr(msg_send![class!(NSColor), colorWithRed:r green:g blue:b alpha:a]) };
Color::Custom(Arc::new(RwLock::new(id)))
});