fix crash from incorrect send job

related to #4153
Clsoes #4246
// FREEBIE
This commit is contained in:
Jake McGinty 2015-10-13 21:46:40 -07:00 committed by Moxie Marlinspike
parent d70f0f1216
commit 8fe5f35b13

View File

@ -102,6 +102,10 @@ public class PushMediaSendJob extends PushSendJob implements InjectableType {
throws RetryLaterException, InsecureFallbackApprovalException, UntrustedIdentityException,
UndeliverableMessageException
{
if (message.getTo() == null || message.getTo().length == 0) {
throw new UndeliverableMessageException("No destination address.");
}
TextSecureMessageSender messageSender = messageSenderFactory.create();
try {