Showing
1 changed file
with
4 additions
and
3 deletions
... | @@ -8225,9 +8225,10 @@ static void distanceFunc(sqlite3_context *context, int argc, sqlite3_value **arg | ... | @@ -8225,9 +8225,10 @@ static void distanceFunc(sqlite3_context *context, int argc, sqlite3_value **arg |
8225 | NSLog(@"Beacon scanning is disabled"); | 8225 | NSLog(@"Beacon scanning is disabled"); |
8226 | } | 8226 | } |
8227 | 8227 | ||
8228 | - if ([applicationVariables objectForKey:WL_AUTHENTICATION]) { | 8228 | + id authValueObject = [applicationVariables objectForKey:WL_AUTHENTICATION]; |
8229 | - NSString *authValue = [applicationVariables objectForKey:WL_AUTHENTICATION]; | 8229 | + if (authValueObject && authValueObject != [NSNull null]) { |
8230 | - if (authValue && [authValue isEqualToString:@"JWT"]) { | 8230 | + NSString *authValue = (NSString *)authValueObject; |
8231 | + if ([authValue isEqualToString:@"JWT"]) { | ||
8231 | // AUTHENTICATION key exists and its value is "JWT" | 8232 | // AUTHENTICATION key exists and its value is "JWT" |
8232 | [defaults setBool:YES forKey:WL_IS_JWT_ENABLED]; | 8233 | [defaults setBool:YES forKey:WL_IS_JWT_ENABLED]; |
8233 | } else { | 8234 | } else { | ... | ... |
-
Please register or login to post a comment