From c50ec21f39b7766d4d7f1e7c6ba2b0d96a06eb03 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Fri, 4 Jul 2014 11:31:03 -0700 Subject: [PATCH] Fix crash when tapping the placeholder --- src/com/limelight/PcView.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/com/limelight/PcView.java b/src/com/limelight/PcView.java index dccdff4b..be8096e0 100644 --- a/src/com/limelight/PcView.java +++ b/src/com/limelight/PcView.java @@ -94,7 +94,11 @@ public class PcView extends Activity { public void onItemClick(AdapterView arg0, View arg1, int pos, long id) { ComputerObject computer = (ComputerObject) pcListAdapter.getItem(pos); - if (computer.details.reachability == ComputerDetails.Reachability.OFFLINE) { + if (computer.details == null) { + // Placeholder item; no context menu for it + return; + } + else if (computer.details.reachability == ComputerDetails.Reachability.OFFLINE) { // Open the context menu if a PC is offline openContextMenu(arg1); }