Better check

This commit is contained in:
M66B 2019-06-25 12:48:04 +02:00
parent 96f820658b
commit 21631c17be
1 changed files with 4 additions and 1 deletions

View File

@ -299,9 +299,12 @@ public class ServiceSend extends LifecycleService {
boolean debug = prefs.getBoolean("debug", false);
if (message.identity == null)
throw new IllegalArgumentException("Identity removed");
throw new IllegalArgumentException("Send without identity");
EntityIdentity ident = db.identity().getIdentity(message.identity);
if (ident == null)
throw new IllegalArgumentException("Identity not found");
String protocol = ident.getProtocol();
// Get properties