Skip to content

Commit

Permalink
Merge pull request #20828 from wordpress-mobile/fix/crash-when-openin…
Browse files Browse the repository at this point in the history
…g-themes

Fix Core Data threading issue in ThemeService
  • Loading branch information
kean authored Jun 12, 2023
2 parents 6b47110 + 5f90755 commit b9a9ee8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion WordPress/Classes/Services/ThemeService.m
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ - (NSProgress *)getThemesForBlog:(Blog *)blog
NSMutableSet *unsyncedThemes = [NSMutableSet setWithSet:blogInContext.themes];
[unsyncedThemes minusSet:[NSSet setWithArray:themes]];
for (Theme *deleteTheme in unsyncedThemes) {
if (![blog.currentThemeId isEqualToString:deleteTheme.themeId]) {
if (![blogInContext.currentThemeId isEqualToString:deleteTheme.themeId]) {
[context deleteObject:deleteTheme];
}
}
Expand Down

0 comments on commit b9a9ee8

Please sign in to comment.