]> git.lizzy.rs Git - rust.git/blobdiff - src/libpanic_unwind/emcc.rs
Rollup merge of #68084 - estebank:ice-68000, r=varkor
[rust.git] / src / libpanic_unwind / emcc.rs
index 2098404ee1b9d6cbb7b908c5a8094739b601fcd5..9d3fe5254f8a9de7b254d930bd133f031097dedb 100644 (file)
@@ -63,7 +63,7 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> {
 pub unsafe fn panic(data: Box<dyn Any + Send>) -> u32 {
     let sz = mem::size_of_val(&data);
     let exception = __cxa_allocate_exception(sz);
-    if exception == ptr::null_mut() {
+    if exception.is_null() {
         return uw::_URC_FATAL_PHASE1_ERROR as u32;
     }
     ptr::write(exception as *mut _, data);