Skip to content

Commit

Permalink
Make sure the context passed to checkConnection is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloercoli committed Jun 16, 2015
1 parent bbed10b commit 5426142
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ public static boolean isAirplaneModeOn(Context context) {
* and returns false
*/
public static boolean checkConnection(Context context) {
if(context == null) {
return false;
}
if (isNetworkAvailable(context)) {
return true;
}
Expand Down

0 comments on commit 5426142

Please sign in to comment.