aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenny Root <kenny@the-b.org>2015-03-29 02:22:54 +0100
committerKenny Root <kenny@the-b.org>2015-03-29 02:22:54 +0100
commit7e600201f9592e9f8f6b2c6f0b3dd7b31db1c7fc (patch)
tree081f32947eb884ac08d880146114cf96132802df /src
parent9b8679679d407926694d776e4ea13fd8b928edcf (diff)
parent91ab7e4d65c90ce489cc40810bc266c8e0bbc644 (diff)
downloadconnectbot-7e600201f9592e9f8f6b2c6f0b3dd7b31db1c7fc.tar.gz
connectbot-7e600201f9592e9f8f6b2c6f0b3dd7b31db1c7fc.tar.bz2
connectbot-7e600201f9592e9f8f6b2c6f0b3dd7b31db1c7fc.zip
Merge pull request #60 from sblackshear/service_npe_fix
Fix possible NPE in HostListActivity.onCreateContextMenu
Diffstat (limited to 'src')
-rw-r--r--src/org/connectbot/HostListActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/org/connectbot/HostListActivity.java b/src/org/connectbot/HostListActivity.java
index 3929ee7..7dce760 100644
--- a/src/org/connectbot/HostListActivity.java
+++ b/src/org/connectbot/HostListActivity.java
@@ -345,7 +345,9 @@ public class HostListActivity extends ListActivity {
// edit, disconnect, delete
MenuItem connect = menu.add(R.string.list_host_disconnect);
- final TerminalBridge bridge = bound.getConnectedBridge(host);
+ TerminalBridge bridge = null;
+ if (bound != null)
+ bridge = bound.getConnectedBridge(host);
connect.setEnabled((bridge != null));
connect.setOnMenuItemClickListener(new OnMenuItemClickListener() {
public boolean onMenuItemClick(MenuItem item) {