소스 검색

base url can be null

Fixes #1458

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
Andy Scherzinger 3 년 전
부모
커밋
0ec4ecfa95
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      app/src/main/java/com/nextcloud/talk/controllers/ProfileController.java

+ 4 - 1
app/src/main/java/com/nextcloud/talk/controllers/ProfileController.java

@@ -307,9 +307,12 @@ public class ProfileController extends BaseController {
         if (getActivity() == null) {
             return;
         }
-        ((TextView) getActivity()
+
+        if (currentUser.getBaseUrl() != null) {
+            ((TextView) getActivity()
                 .findViewById(R.id.userinfo_baseurl))
                 .setText(Uri.parse(currentUser.getBaseUrl()).getHost());
+        }
 
         DisplayUtils.loadAvatarImage(currentUser, getActivity().findViewById(R.id.avatar_image), false);