diff options
-rw-r--r-- | mlua-sys/src/luau/luacode.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mlua-sys/src/luau/luacode.rs b/mlua-sys/src/luau/luacode.rs index ae90e50..357ad25 100644 --- a/mlua-sys/src/luau/luacode.rs +++ b/mlua-sys/src/luau/luacode.rs @@ -36,6 +36,7 @@ pub unsafe fn luau_compile(source: &[u8], mut options: lua_CompileOptions) -> Ve &mut options, &mut outsize, ); + assert!(!data_ptr.is_null(), "luau_compile failed"); let data = slice::from_raw_parts(data_ptr as *mut u8, outsize).to_vec(); free(data_ptr as *mut c_void); data |