aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2025-01-13 11:03:19 +0100
committerDrew DeVault <sir@cmpwn.com>2025-01-13 11:03:29 +0100
commit304d7203d19f71efac49422b5b72f1b5e6f89ff8 (patch)
tree9673fa92bcd2f033b800c5036f2bff308896cd1f
parentAdd SDL text input wrappers (diff)
downloadhare-chip8-304d7203d19f71efac49422b5b72f1b5e6f89ff8.tar.gz
sdl2/rwops: assert on allocation failure
-rw-r--r--sdl2/rwops.ha2
1 files changed, 1 insertions, 1 deletions
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;