Skip to content

Commit 652e7ac

Browse files
committed
Make sure the context passed to checkConnection is not null
1 parent 8699590 commit 652e7ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

WordPressUtils/src/main/java/org/wordpress/android/util/NetworkUtils.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ public static boolean isAirplaneModeOn(Context context) {
7777
* and returns false
7878
*/
7979
public static boolean checkConnection(Context context) {
80+
if(context == null) {
81+
return false;
82+
}
8083
if (isNetworkAvailable(context)) {
8184
return true;
8285
}

0 commit comments

Comments
 (0)