Dismiss progressDialog only if it's showing.