fix a bug where saving a toot with attached media would crash the app

main
Conny Duck 7 years ago
parent 4722acb2c5
commit 626ffd79f1
  1. 4
      app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

@ -687,7 +687,9 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm
if (!ListUtils.isEmpty(savedList)) {
String json = new Gson().toJson(savedList);
toot.setUrls(json);
deleteMedia(setDifference(existingUris, savedList));
if(!ListUtils.isEmpty(existingUris)) {
deleteMedia(setDifference(existingUris, savedList));
}
} else {
return false;
}

Loading…
Cancel
Save