Skip to content

Commit

Permalink
Fix crash when content directory device is removed
Browse files Browse the repository at this point in the history
  • Loading branch information
trishika committed Mar 1, 2015
1 parent f879aae commit 4d5f838
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,15 @@ public void update(Observable observable, Object o)
IUpnpDevice device = Main.upnpServiceController.getSelectedContentDirectory();
if(device==null)
{
// Uncheck device
getListView().clearChoices();
list.notifyDataSetChanged();
if (getActivity() != null) // Visible
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// Uncheck device
getListView().clearChoices();
list.notifyDataSetChanged();
}
});
}
else
{
Expand Down

0 comments on commit 4d5f838

Please sign in to comment.