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

This commit is contained in:
Conny Duck 2017-10-17 09:37:59 +02:00
parent 76bf08abea
commit c3ffed56da

View file

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