From f2035c67cc98a8fdb51bd79fbed33264e7396013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Gra=C3=B1a?= Date: Fri, 18 Jun 2021 23:33:56 -0300 Subject: [PATCH] Avoid crash if session object is not ok It is not clear yet what is the case that generate this, but I had some crashes because the accessToken was nil. --- ios/RNSpotifyRemoteConvert.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/RNSpotifyRemoteConvert.m b/ios/RNSpotifyRemoteConvert.m index 0dacf5c..d807776 100644 --- a/ios/RNSpotifyRemoteConvert.m +++ b/ios/RNSpotifyRemoteConvert.m @@ -205,7 +205,7 @@ +(id)SPTAppRemoteContentItems:(NSArray *) items{ } +(id)SPTSession:(SPTSession *)session{ - if(session == nil){ + if(session == nil || session.accessToken == nil || session.refreshToken == nil){ return [NSNull null]; }