Skip to content
Permalink
Browse files

Attempt at fixing a random exception/crash involving SPIndexesController

  • Loading branch information...
dmoagx committed Feb 24, 2019
1 parent c88e7c5 commit 664a46cd7cfaf8ea1cb7f5172b5f98f69a97bc25
Showing with 8 additions and 3 deletions.
  1. +8 −3 Source/SPIndexesController.m
@@ -524,6 +524,8 @@ - (void)setFields:(NSArray *)tableFields
[indexedFields removeAllObjects];

if ([fields count]) [indexedFields addObject:[[[fields objectAtIndex:0] mutableCopy] autorelease]];

[indexedColumnsTableView reloadData];
}

/**
@@ -883,9 +885,12 @@ - (void)_addIndexUsingDetails:(NSDictionary *)indexDetails
[tempIndexedColumns release];
}

// Reset indexed fields to default
[indexedFields removeAllObjects];
[indexedFields addObject:[[[fields objectAtIndex:0] mutableCopy] autorelease]];
SPMainQSync(^{
// Reset indexed fields to default
[indexedFields removeAllObjects];
[indexedFields addObject:[[[fields objectAtIndex:0] mutableCopy] autorelease]];
[indexedColumnsTableView reloadData];
});

[dbDocument endTask];
}

1 comment on commit 664a46c

@lievikoff

This comment has been minimized.

Copy link

lievikoff commented on 664a46c Mar 20, 2019

That is amazing. Thank you! It finally doesn't crash.
macOS: 10.14.3

Please sign in to comment.
You can’t perform that action at this time.