From a5a4b360ae5f60c6672893bc30c324fc4d3decbd Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Sun, 5 Feb 2017 15:34:16 +0100 Subject: [PATCH] Fixed crash on unpairing --- src/org/kde/kdeconnect/UserInterface/DeviceFragment.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java index 290f1903..d72b50f2 100644 --- a/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java +++ b/src/org/kde/kdeconnect/UserInterface/DeviceFragment.java @@ -441,6 +441,7 @@ public class DeviceFragment extends Fragment { mActivity.runOnUiThread(new Runnable() { @Override public void run() { + if (rootView == null) return; ((TextView) rootView.findViewById(R.id.pair_message)).setText(error); rootView.findViewById(R.id.pair_progress).setVisibility(View.GONE); rootView.findViewById(R.id.pair_button).setVisibility(View.VISIBLE); @@ -455,6 +456,7 @@ public class DeviceFragment extends Fragment { mActivity.runOnUiThread(new Runnable() { @Override public void run() { + if (rootView == null) return; ((TextView) rootView.findViewById(R.id.pair_message)).setText(R.string.device_not_paired); rootView.findViewById(R.id.pair_progress).setVisibility(View.GONE); rootView.findViewById(R.id.pair_button).setVisibility(View.VISIBLE);