diff options
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/java/org/connectbot/util/HostDatabase.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/org/connectbot/util/HostDatabase.java b/app/src/main/java/org/connectbot/util/HostDatabase.java index d1d87c7..ff8a622 100644 --- a/app/src/main/java/org/connectbot/util/HostDatabase.java +++ b/app/src/main/java/org/connectbot/util/HostDatabase.java @@ -592,10 +592,13 @@ public class HostDatabase extends RobustSQLiteOpenHelper { /** * Returns a list of all the port forwards associated with a particular host ID. * @param host the host for which we want the port forward list - * @return port forwards associated with host ID + * @return port forwards associated with host ID or empty list if no match */ public List<PortForwardBean> getPortForwardsForHost(HostBean host) { List<PortForwardBean> portForwards = new LinkedList<PortForwardBean>(); + if (host == null) { + return portForwards; + } synchronized (dbLock) { SQLiteDatabase db = this.getReadableDatabase(); |