From 916ee58690566634d5e0b05a4178a9c4db48daf9 Mon Sep 17 00:00:00 2001 From: vanitasvitae Date: Sun, 11 Sep 2016 13:06:13 +0200 Subject: [PATCH] setupUI before applying proxy settings to mitigate nullpointer on WebView --- .../github/dfa/diaspora_android/activity/MainActivity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java index eb66c894..7277e472 100644 --- a/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java +++ b/app/src/main/java/com/github/dfa/diaspora_android/activity/MainActivity.java @@ -187,6 +187,8 @@ public class MainActivity extends AppCompatActivity podUserProfile.setListener(this); urls = new DiasporaUrlHelper(appSettings); + setupUI(savedInstanceState); + if (appSettings.isProxyEnabled()) { if (!setProxy(appSettings.getProxyHost(), appSettings.getProxyPort())) { Log.d(App.TAG, "Could not enable Proxy"); @@ -195,8 +197,6 @@ public class MainActivity extends AppCompatActivity } else if (appSettings.wasProxyEnabled()) { resetProxy(); } - - setupUI(savedInstanceState); } private void setupUI(Bundle savedInstanceState) {