diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h index 080ba42ad44497..f3c3d757c9f128 100644 --- a/compiler-rt/lib/scudo/standalone/combined.h +++ b/compiler-rt/lib/scudo/standalone/combined.h @@ -688,12 +688,14 @@ class Allocator { Quarantine.disable(); Primary.disable(); Secondary.disable(); - Depot->disable(); + if (Depot) + Depot->disable(); } void enable() NO_THREAD_SAFETY_ANALYSIS { initThreadMaybe(); - Depot->enable(); + if (Depot) + Depot->enable(); Secondary.enable(); Primary.enable(); Quarantine.enable();