]> Pileus Git - ~andy/spades/commitdiff
Prevent app crash on Empty Send. master
authorJake Whiteley <the.jake.whiteley@gmail.com>
Sun, 29 May 2016 23:28:27 +0000 (19:28 -0400)
committerAndy Spencer <andy753421@gmail.com>
Mon, 30 May 2016 00:24:06 +0000 (00:24 +0000)
Application crashes if send button is pressed with an empty message.

Fixed with a check if txt is empty before sending it to the handler.

src/Main.java

index 09c61809e19ae8a63c2588e46a14b4a670d1135a..a88c5164572b70053a15d7fc5b31430edc866b04 100644 (file)
@@ -263,6 +263,8 @@ public class Main extends Activity
                if (this.task == null)
                        return;
                String  txt = this.input.getText().toString();
+               if (txt.isEmpty())
+                       return;
                Message msg = this.task.send(txt);
                if (msg == null)
                        return;