From 304d7203d19f71efac49422b5b72f1b5e6f89ff8 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 13 Jan 2025 11:03:19 +0100 Subject: sdl2/rwops: assert on allocation failure --- sdl2/rwops.ha | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdl2/rwops.ha b/sdl2/rwops.ha index 4605a3a..da5d83d 100644 --- a/sdl2/rwops.ha +++ b/sdl2/rwops.ha @@ -67,7 +67,7 @@ export fn rw_from_handle(in: io::handle) *SDL_RWops = { close = &stream_close, type_ = rwops_type::UNKNOWN, ... - }); + })!; // Assert that we can cram an io::handle into the SDL_RWops struct static assert(size(io::handle) <= size(nullable *u8) * 2); let ptr = &rw.hidden.unknown.data1: *io::handle; -- cgit v1.2.3