headlinesfragment: check if getView() exists before assigning list empty

view
This commit is contained in:
Andrew Dolgov 2013-02-13 09:47:04 +04:00
parent da36af7b42
commit be9c8d6614
2 changed files with 7 additions and 5 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="135"
android:versionName="1.13" >
android:versionCode="136"
android:versionName="1.14" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -357,11 +357,13 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
protected void onPostExecute(JsonElement result) {
if (isDetached()) return;
if (getView() != null) {
ListView list = (ListView)getView().findViewById(R.id.headlines);
if (list != null) {
list.setEmptyView(getView().findViewById(R.id.no_headlines));
}
}
m_activity.setProgressBarVisibility(false);