mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
Fix IllegalStateException: Fragment not attached to Activity
BUG: 379873
This commit is contained in:
@@ -99,6 +99,11 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
if (!isAdded()) {
|
||||
//Fragment is not attached to an activity. We will crash if we try to do anything here.
|
||||
return;
|
||||
}
|
||||
|
||||
if (listRefreshCalledThisFrame) {
|
||||
// This makes sure we don't try to call list.getFirstVisiblePosition()
|
||||
// twice per frame, because the second time the list hasn't been drawn
|
||||
|
Reference in New Issue
Block a user