android: Fix a potential NullPointerException in the IMC state fragment
This commit is contained in:
@@ -24,6 +24,7 @@ import org.strongswan.android.logic.imc.ImcState;
|
|||||||
import org.strongswan.android.logic.imc.RemediationInstruction;
|
import org.strongswan.android.logic.imc.RemediationInstruction;
|
||||||
|
|
||||||
import android.app.Fragment;
|
import android.app.Fragment;
|
||||||
|
import android.app.FragmentManager;
|
||||||
import android.app.FragmentTransaction;
|
import android.app.FragmentTransaction;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
@@ -174,7 +175,12 @@ public class ImcStateFragment extends Fragment implements VpnStateListener
|
|||||||
|
|
||||||
public void updateView()
|
public void updateView()
|
||||||
{
|
{
|
||||||
FragmentTransaction ft = getFragmentManager().beginTransaction();
|
FragmentManager fm = getFragmentManager();
|
||||||
|
if (fm == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
FragmentTransaction ft = fm.beginTransaction();
|
||||||
|
|
||||||
switch (mService.getImcState())
|
switch (mService.getImcState())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user