From 39af724d2673657aa50224f13d96076fc993eaaa Mon Sep 17 00:00:00 2001 From: HalloIhr0 <124879136+HalloIhr0@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:06:44 +0200 Subject: [PATCH] Added macos check to SDL_Metal_DestroyView call --- src/sdl2/video.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sdl2/video.rs b/src/sdl2/video.rs index a47ff20c59..b539085418 100644 --- a/src/sdl2/video.rs +++ b/src/sdl2/video.rs @@ -555,6 +555,7 @@ impl Drop for WindowContext { #[doc(alias = "SDL_DestroyWindow")] fn drop(&mut self) { unsafe { + #[cfg(target_os = "macos")] if !self.metal_view.is_null() { sys::SDL_Metal_DestroyView(self.metal_view); }