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
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}