Need to check the spinner state to avoid crash

Fix crash when activity was finishing or already finished.