Bug fixed in UART: empty command

This commit is contained in:
Aleksander Nowakowski
2016-10-20 16:58:32 +02:00
parent fc24969483
commit 8981a23d77

View File

@@ -105,6 +105,8 @@ public class UARTControlFragment extends Fragment implements GridView.OnItemClic
final Command command = (Command)mAdapter.getItem(position); final Command command = (Command)mAdapter.getItem(position);
final Command.Eol eol = command.getEol(); final Command.Eol eol = command.getEol();
String text = command.getCommand(); String text = command.getCommand();
if (text == null)
text = "";
switch (eol) { switch (eol) {
case CR_LF: case CR_LF:
text = text.replaceAll("\n", "\r\n"); text = text.replaceAll("\n", "\r\n");