am 29961911: Merge "Fix music crash when search song."
* commit '2996191189a9104852eedf1c97b68b0259579586':
Fix music crash when search song.
diff --git a/src/com/android/music/QueryBrowserActivity.java b/src/com/android/music/QueryBrowserActivity.java
index 977650c..fb29a3d 100644
--- a/src/com/android/music/QueryBrowserActivity.java
+++ b/src/com/android/music/QueryBrowserActivity.java
@@ -210,7 +210,9 @@
// Because we pass the adapter to the next activity, we need to make
// sure it doesn't keep a reference to this activity. We can do this
// by clearing its DatasetObservers, which setListAdapter(null) does.
- setListAdapter(null);
+ if (getListView() != null) {
+ setListAdapter(null);
+ }
mAdapter = null;
super.onDestroy();
}