diff options
Diffstat (limited to 'main/src/cgeo/geocaching/export/FieldnoteExport.java')
| -rw-r--r-- | main/src/cgeo/geocaching/export/FieldnoteExport.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/main/src/cgeo/geocaching/export/FieldnoteExport.java b/main/src/cgeo/geocaching/export/FieldnoteExport.java index c03b848..c4a6adc 100644 --- a/main/src/cgeo/geocaching/export/FieldnoteExport.java +++ b/main/src/cgeo/geocaching/export/FieldnoteExport.java @@ -59,10 +59,11 @@ public class FieldnoteExport extends AbstractExport { final AlertDialog.Builder builder = new AlertDialog.Builder(activity); final Context themedContext; - if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB) + if (Settings.isLightSkin() && VERSION.SDK_INT < VERSION_CODES.HONEYCOMB) { themedContext = new ContextThemeWrapper(activity, R.style.dark); - else + } else { themedContext = activity; + } final View layout = View.inflate(themedContext, R.layout.fieldnote_export_dialog, null); builder.setView(layout); @@ -135,8 +136,10 @@ public class FieldnoteExport extends AbstractExport { for (final Geocache cache : caches) { if (ConnectorFactory.getConnector(cache).equals(connector) && cache.isLogOffline()) { final LogEntry log = DataStore.loadLogOffline(cache.getGeocode()); - if (!onlyNew || log.date > Settings.getFieldnoteExportDate()) { - fieldNotes.add(cache, log); + if (log != null) { + if (!onlyNew || log.date > Settings.getFieldnoteExportDate()) { + fieldNotes.add(cache, log); + } } } publishProgress(++i); |
