Make sure we actually have an adapter before trying to access it.
Fixes bug 2177763.
diff --git a/src/com/android/music/PlaylistBrowserActivity.java b/src/com/android/music/PlaylistBrowserActivity.java
index ccdb529..3c5ad22 100644
--- a/src/com/android/music/PlaylistBrowserActivity.java
+++ b/src/com/android/music/PlaylistBrowserActivity.java
@@ -169,7 +169,9 @@
     @Override
     public void onDestroy() {
         MusicUtils.unbindFromService(this);
-        if (!mAdapterSent) {
+        // if we have an adapter and didn't send it off to another activity yet, we should
+        // close the cursor
+        if (!mAdapterSent && mAdapter != null) {
             Cursor c = mAdapter.getCursor();
             if (c != null) {
                 c.close();