Skip to content

Commit 70931a2

Browse files
committed
Fix issue that was causing non-refreshing credentials to fail.
1 parent de7fb98 commit 70931a2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

TJDropbox/TJDropbox.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ static void _addTask(TJDropboxCredential *credential,
616616
};
617617
if (credential) {
618618
@synchronized (credential) {
619-
if (credential.expirationDate.timeIntervalSinceNow < 600.0) { // Refresh if there are fewer than 10 minutes until expiration
619+
if (credential.expirationDate != nil && credential.expirationDate.timeIntervalSinceNow < 600.0) { // Refresh if there are fewer than 10 minutes until expiration
620620
void (^refreshCompletionBlock)(NSDictionary *, NSError *) = ^(NSDictionary *parsedResponse, NSError *error) {
621621
credential.refreshCompletionBlocks = nil;
622622
if (error) {

0 commit comments

Comments
 (0)