Skip to content

Commit 83ae193

Browse files
committed
this can be null
1 parent 97c15a9 commit 83ae193

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/byondapi-rs/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ pub unsafe fn parse_args(
2929
argc: byondapi_sys::u4c,
3030
argv: *mut ByondValue,
3131
) -> &'static mut [ByondValue] {
32+
if argv.is_null() {
33+
return &[];
34+
}
3235
unsafe { std::slice::from_raw_parts_mut(argv, argc as usize) }
3336
}
3437

0 commit comments

Comments
 (0)