Skip to content

Commit 23b7f3f

Browse files
committed
fixed #375
1 parent 2118711 commit 23b7f3f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

cSploit/src/org/csploit/android/services/NetworkRadar.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void run() {
6161
@Override
6262
public void buildMenuItem(MenuItem item) {
6363
item.setTitle(isRunning() ? R.string.stop_monitor : R.string.start_monitor);
64-
item.setEnabled(System.getTools().networkRadar.isEnabled());
64+
item.setEnabled(System.getTools().networkRadar.isEnabled() && System.getNetwork() != null);
6565
}
6666

6767
private class Receiver extends org.csploit.android.tools.NetworkRadar.HostReceiver {

cSploit/src/org/csploit/android/tools/NetworkRadar.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ public void onEvent(Event e) {
5656
public Child start(HostReceiver receiver) throws ChildManager.ChildNotStartedException {
5757
String ifName;
5858

59+
if(System.getNetwork() == null) {
60+
throw new ChildManager.ChildNotStartedException();
61+
}
62+
5963
ifName = System.getNetwork().getInterface().getDisplayName();
6064

6165
return async(ifName, receiver);

0 commit comments

Comments
 (0)