fix headlines fragment setSearchQuery() crashing if called before view initialization

This commit is contained in:
Andrew Dolgov 2016-05-30 12:39:06 +03:00
parent bcd19a284e
commit 0ce76cdf1d
2 changed files with 7 additions and 3 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="411"
android:versionName="1.177" >
android:versionCode="412"
android:versionName="1.178" >
<uses-sdk
android:minSdkVersion="16"

View File

@ -1693,7 +1693,11 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
public void setSearchQuery(String query) {
if (!m_searchQuery.equals(query)) {
m_searchQuery = query;
refresh(false);
// could be called before fragment view has been initialized
if (m_list != null) {
refresh(false);
}
}
}