Skip to content

Commit

Permalink
Added macos check to SDL_Metal_DestroyView call
Browse files Browse the repository at this point in the history
  • Loading branch information
HalloIhr0 committed Jun 15, 2024
1 parent 380c6f1 commit 39af724
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sdl2/video.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 39af724

Please sign in to comment.