Merge "Fix NPE when Spinner is reused."
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java
index b534c34..58c2613 100644
--- a/core/java/android/widget/Spinner.java
+++ b/core/java/android/widget/Spinner.java
@@ -78,7 +78,7 @@
             mPopup = new DialogPopup();
             break;
         }
-        
+
         case MODE_DROPDOWN: {
             final int hintResource = a.getResourceId(
                     com.android.internal.R.styleable.Spinner_popupPromptView, 0);
@@ -144,7 +144,6 @@
         
         if (mPopup != null && mPopup.isShowing()) {
             mPopup.dismiss();
-            mPopup = null;
         }
     }
 
@@ -316,7 +315,6 @@
     public void onClick(DialogInterface dialog, int which) {
         setSelection(which);
         dialog.dismiss();
-        mPopup = null;
     }
 
     /**
@@ -542,7 +540,8 @@
                 mHintView.setText(hintText);
             }
         }
-        
+
+        @Override
         public void show() {
             if (mHintView == null) {
                 final TextView textView = (TextView) LayoutInflater.from(getContext()).inflate(