fix possible crash in headlinesfragment.refresh if invoked when fragment

is not yet initialized
This commit is contained in:
Andrew Dolgov 2013-06-03 22:52:51 +04:00
parent 124c791ab8
commit 1f91618d33
3 changed files with 3 additions and 4 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="184"
android:versionName="1.8.4" >
android:versionCode="185"
android:versionName="1.8.5" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -282,7 +282,6 @@ public class FeedsFragment extends Fragment implements OnItemClickListener, OnSh
@SuppressWarnings({ "unchecked", "serial" })
public void refresh(boolean background) {
//FeedCategory cat = m_onlineServices.getActiveCategory();
m_activity.setProgressBarVisibility(true);
final int catId = (m_activeCategory != null) ? m_activeCategory.id : -4;

View File

@ -362,7 +362,7 @@ public class HeadlinesFragment extends Fragment implements OnItemClickListener,
@SuppressWarnings({ "unchecked", "serial" })
public void refresh(boolean append) {
if (m_activity != null) {
if (m_activity != null && m_feed != null) {
m_refreshInProgress = true;
m_activity.setProgressBarVisibility(true);