Add null check

This commit is contained in:
emanuele-f 2021-01-11 14:39:44 +01:00
parent bca7b8e284
commit 94ff1487e1

View File

@ -246,7 +246,8 @@ public class CaptureService extends VpnService implements Runnable {
@Override
public void run() {
runPacketLoop(mParcelFileDescriptor.detachFd(), this, Build.VERSION.SDK_INT);
if(mParcelFileDescriptor != null)
runPacketLoop(mParcelFileDescriptor.detachFd(), this, Build.VERSION.SDK_INT);
}
/* The following methods are called from native code */