merge in nyc-dr1-release history after reset to nyc-dr1-dev
diff --git a/src/com/android/phone/settings/VoicemailChangePinActivity.java b/src/com/android/phone/settings/VoicemailChangePinActivity.java
index 74adb12..8027dc1 100644
--- a/src/com/android/phone/settings/VoicemailChangePinActivity.java
+++ b/src/com/android/phone/settings/VoicemailChangePinActivity.java
@@ -629,7 +629,12 @@
 
         private void sendResult(@ChangePinResult int result) {
             VvmLog.i(TAG, "Change PIN result: " + result);
-            mProgressDialog.dismiss();
+            if (mProgressDialog.isShowing() && !VoicemailChangePinActivity.this.isDestroyed() &&
+                    !VoicemailChangePinActivity.this.isFinishing()) {
+                mProgressDialog.dismiss();
+            } else {
+                VvmLog.i(TAG, "Dialog not visible, not dismissing");
+            }
             mHandler.obtainMessage(MESSAGE_HANDLE_RESULT, result, 0).sendToTarget();
             releaseNetwork();
         }