Fix crash when sharing to Tusky while not logged in (#1096)

This commit is contained in:
Konrad Pozniak 2019-03-03 21:27:34 +01:00 committed by GitHub
parent 6430ed02d7
commit a0b3494c42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,6 +119,11 @@ public final class MainActivity extends BottomSheetActivity implements ActionBut
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
if(accountManager.getActiveAccount() == null) {
// will be redirected to LoginActivity by BaseActivity
return;
}
Intent intent = getIntent(); Intent intent = getIntent();
boolean showNotificationTab = false; boolean showNotificationTab = false;