summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/BrowserSnapshotPage.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/com/android/browser/BrowserSnapshotPage.java b/src/com/android/browser/BrowserSnapshotPage.java
index a0ec5e9..0953879 100644
--- a/src/com/android/browser/BrowserSnapshotPage.java
+++ b/src/com/android/browser/BrowserSnapshotPage.java
@@ -218,8 +218,10 @@ public class BrowserSnapshotPage extends Fragment implements
TextView title = (TextView) view.findViewById(R.id.title);
title.setText(cursor.getString(SNAPSHOT_TITLE));
TextView size = (TextView) view.findViewById(R.id.size);
- int stateLen = cursor.getInt(SNAPSHOT_VIEWSTATE_LENGTH);
- size.setText(String.format("%.2fMB", stateLen / 1024f / 1024f));
+ if (size != null) {
+ int stateLen = cursor.getInt(SNAPSHOT_VIEWSTATE_LENGTH);
+ size.setText(String.format("%.2fMB", stateLen / 1024f / 1024f));
+ }
long timestamp = cursor.getLong(SNAPSHOT_DATE_CREATED);
TextView date = (TextView) view.findViewById(R.id.date);
DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);