diff --git a/app/src/main/java/fr/mobdev/lpcprog/dialog/ServerDialog.java b/app/src/main/java/fr/mobdev/lpcprog/dialog/ServerDialog.java index 6a267e7..3f9d1df 100644 --- a/app/src/main/java/fr/mobdev/lpcprog/dialog/ServerDialog.java +++ b/app/src/main/java/fr/mobdev/lpcprog/dialog/ServerDialog.java @@ -67,6 +67,10 @@ public class ServerDialog extends DialogFragment { EditText urlText = (EditText) view.findViewById(R.id.url_text); if(urlText.getText().length() > 0) url += urlText.getText(); + else + return; + if(!url.endsWith("/")) + url += "/"; //add server to database DatabaseManager.getInstance(getActivity().getApplicationContext()).addServer(url); listener.updateServerList();