Fix possible UB by checking for null allocating FX.
Namely, the global allocator API in Rust, actually only returns a null pointer on failure, rather than wrapping it in a Result, which AllocRef does. Since Box::from_raw(null) is direct UB, this can in theory lead to very strange behavior.
Loading
Please register or sign in to comment