From c7f481d5ba17ce6924bae1b74f5ec22b0beb50ff Mon Sep 17 00:00:00 2001 From: Adam Baker Date: Sun, 3 Jan 2016 13:40:15 +0000 Subject: [PATCH] Fix possible null pointer dereference in triggerSearch() --- .../com/github/nutomic/controldlna/gui/ServerFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java b/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java index 091e31b..0c969d0 100644 --- a/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java +++ b/src/main/java/com/github/nutomic/controldlna/gui/ServerFragment.java @@ -431,7 +431,8 @@ public class ServerFragment extends ListFragment implements OnBackPressedListene public void triggerSearch() { - mUpnpService.getControlPoint().search(); + if (mUpnpService != null) + mUpnpService.getControlPoint().search(); } }