Add null check to avoid crash in unit tests that use mock singletons.
Summary: Some unit tests owned by my team are failing due to segmentation fault in SingletonHolder<T>::registerSingletonMock -> SingletonHolder<T>::destroyInstance. Test Plan: Run folly unit tests and my unit tests. Reviewed By: henryf@fb.com Subscribers: trunkagent, folly-diffs@, yfeldblum FB internal diff: D1873889 Signature: t1:1873889:1425925156:29d54092939d7e9debea3fd55f7105fd320e987e Blame Revision: 91f4942e
Showing
Please register or sign in to comment