Commit 4802041fca196ed5fd070442272b857ce7bed8a5
1 parent
bbf60f3c
解决uid为空问题
Showing
1 changed file
with
5 additions
and
1 deletions
app/src/main/java/com/cnlive/libs/OtherActivity.java
| @@ -43,7 +43,11 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener | @@ -43,7 +43,11 @@ public class OtherActivity extends BaseActivity implements View.OnClickListener | ||
| 43 | protected void onCreate(Bundle savedInstanceState) { | 43 | protected void onCreate(Bundle savedInstanceState) { |
| 44 | super.onCreate(savedInstanceState); | 44 | super.onCreate(savedInstanceState); |
| 45 | setContentView(R.layout.activity_other); | 45 | setContentView(R.layout.activity_other); |
| 46 | - uid = userData.getData().getUid(); | 46 | + if (userData != null && userData.getData() != null && userData.getData().getUid() != null) { |
| 47 | + uid = userData.getData().getUid(); | ||
| 48 | + } else { | ||
| 49 | + uid = ""; | ||
| 50 | + } | ||
| 47 | initView(); | 51 | initView(); |
| 48 | } | 52 | } |
| 49 | 53 |