summaryrefslogtreecommitdiff
path: root/main/src
diff options
context:
space:
mode:
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java b/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java
index 50df86c1..5a5a846f 100644
--- a/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java
+++ b/main/src/main/java/de/blinkt/openvpn/fragments/ShowConfigFragment.java
@@ -34,15 +34,15 @@ public class ShowConfigFragment extends Fragment {
mfabButton = (ImageButton) v.findViewById(R.id.share_config);
- if (mfabButton!=null)
- mfabButton.setOnClickListener( new View.OnClickListener() {
- @Override
- public void onClick(View v) {
- shareConfig();
- }
- });
- mfabButton.setVisibility(View.INVISIBLE);
-
+ if (mfabButton!=null) {
+ mfabButton.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ shareConfig();
+ }
+ });
+ mfabButton.setVisibility(View.INVISIBLE);
+ }
return v;
}
@@ -57,7 +57,8 @@ public class ShowConfigFragment extends Fragment {
@Override
public void run() {
cv.setText(configtext);
- mfabButton.setVisibility(View.VISIBLE);
+ if (mfabButton!=null)
+ mfabButton.setVisibility(View.VISIBLE);
}
});