aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsudev <rasch@munin-soft.de>2013-12-24 17:16:03 +0100
committerrsudev <rasch@munin-soft.de>2013-12-24 17:16:03 +0100
commit78346dc4d407493b659d0076bfb66ba540a9002f (patch)
tree43e187269707a99cb2798151fe7e633499b56934
parentbfb6ba671ee39b48825f2c86c0e41c2b0bd202aa (diff)
downloadcgeo-78346dc4d407493b659d0076bfb66ba540a9002f.zip
cgeo-78346dc4d407493b659d0076bfb66ba540a9002f.tar.gz
cgeo-78346dc4d407493b659d0076bfb66ba540a9002f.tar.bz2
Fixes #3471, NPE when leaving cache details
Check for not stored view state on restoring
-rw-r--r--main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java b/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java
index 8588e21..75d90eb 100644
--- a/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java
+++ b/main/src/cgeo/geocaching/ui/AbstractCachingListViewPageViewCreator.java
@@ -10,7 +10,7 @@ import android.widget.ListView;
/**
* {@link PageViewCreator} for {@link ListView}, which can save scroll state on purging a page from the
* {@link ViewPager}, and restore the state on re-recreation.
- *
+ *
*/
public abstract class AbstractCachingListViewPageViewCreator extends AbstractCachingPageViewCreator<ListView> {
private static final String STATE_POSITION_FROM_TOP = "positionFromTop";
@@ -41,7 +41,7 @@ public abstract class AbstractCachingListViewPageViewCreator extends AbstractCac
*/
@Override
public void setViewState(Bundle state) {
- if (view == null) {
+ if (view == null || state == null) {
return;
}
int logViewPosition = state.getInt(STATE_POSITION);