From 8349d3d248fefa2725905119b608396bb4c64e42 Mon Sep 17 00:00:00 2001 From: Pavol Zibrita Date: Tue, 28 Jun 2011 10:13:48 +0200 Subject: [PATCH] fixed null pointer --- .../osmand/plus/activities/DownloadIndexActivity.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java index f029699b87..978d37c37d 100644 --- a/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/DownloadIndexActivity.java @@ -48,6 +48,7 @@ import android.app.AlertDialog.Builder; import android.app.ListActivity; import android.app.ProgressDialog; import android.content.DialogInterface; +import android.content.Intent; import android.graphics.Color; import android.os.Bundle; import android.text.Editable; @@ -119,9 +120,12 @@ public class DownloadIndexActivity extends ListActivity { filterText = (EditText) findViewById(R.id.search_box); filterText.addTextChangedListener(textWatcher); - final String filter = getIntent().getExtras().getString(FILTER_KEY); - if (filter != null) { - filterText.setText(filter); + final Intent intent = getIntent(); + if (intent != null && intent.getExtras() != null) { + final String filter = intent.getExtras().getString(FILTER_KEY); + if (filter != null) { + filterText.setText(filter); + } } if(downloadListIndexThread.getCachedIndexFiles() != null){