From a9fea9f6065550890268692d845fed5e62cc7443 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Mon, 12 Mar 2018 15:57:35 +0100 Subject: [PATCH] fix release crash because of setting sidebar header --- app/src/main/java/org/schabi/newpipe/MainActivity.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/MainActivity.java b/app/src/main/java/org/schabi/newpipe/MainActivity.java index 573479ea7..1c62690c2 100644 --- a/app/src/main/java/org/schabi/newpipe/MainActivity.java +++ b/app/src/main/java/org/schabi/newpipe/MainActivity.java @@ -176,9 +176,11 @@ public class MainActivity extends AppCompatActivity { // when the user returns to MainActivity drawer.closeDrawer(Gravity.START, false); try { - String selectedServiceName = NewPipe.getService( - ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName(); - headerServiceView.setText(selectedServiceName); + if(BuildConfig.BUILD_TYPE != "release" ) { + String selectedServiceName = NewPipe.getService( + ServiceHelper.getSelectedServiceId(this)).getServiceInfo().getName(); + headerServiceView.setText(selectedServiceName); + } } catch (Exception e) { ErrorActivity.reportUiError(this, e); }