Index: base/lazy_instance.cc |
diff --git a/base/lazy_instance.cc b/base/lazy_instance.cc |
index 957482cbb2addd2815e857dea44e62748d13a24a..eb710615e313de397b312848393f97f99b33b2ee 100644 |
--- a/base/lazy_instance.cc |
+++ b/base/lazy_instance.cc |
@@ -37,7 +37,8 @@ void LazyInstanceHelper::CompleteInstance(void* instance, void (*dtor)(void*)) { |
base::subtle::Release_Store(&state_, STATE_CREATED); |
// Make sure that the lazily instantiated object will get destroyed at exit. |
- base::AtExitManager::RegisterCallback(dtor, instance); |
+ if (dtor) |
+ base::AtExitManager::RegisterCallback(dtor, instance); |
} |
} // namespace base |