Avoid show dialog fragment when the fragment manager is destroyed.

Avoid show dialog fragment when the fragment manager is destroyed.