Avoid show dialog fragment when the fragment manager is destroyed.