Skip to content

Commit

Permalink
Fix a crash and bump to 1.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Chen committed Apr 8, 2015
1 parent bc64a5a commit b788189
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MCLog/MCLog-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.3.1</string>
<string>1.3.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
18 changes: 11 additions & 7 deletions MCLog/MCLog.m
Original file line number Diff line number Diff line change
Expand Up @@ -828,13 +828,17 @@ - (void)searchFieldDidEndEditing:(NSNotification *)notification
if ([consoleTextView respondsToSelector:@selector(clearConsoleItems)]) {
[consoleTextView performSelector:@selector(clearConsoleItems) withObject:nil];
}

NSArray *sortedItems = [OriginConsoleItemsMap[hash(consoleArea)] orderedItems];

if ([consoleArea respondsToSelector:@selector(_appendItems:)]) {
[consoleArea performSelector:@selector(_appendItems:) withObject:sortedItems];
}
[SearchPatternsDic removeObjectForKey:hash(consoleArea)];

NSString *cachedKey = hash(consoleArea);
if (cachedKey) {
NSArray *sortedItems = [OriginConsoleItemsMap[hash(consoleArea)] orderedItems];

if ([consoleArea respondsToSelector:@selector(_appendItems:)]) {
[consoleArea performSelector:@selector(_appendItems:) withObject:sortedItems];
}

[SearchPatternsDic removeObjectForKey:hash(consoleArea)];
}
#pragma clang diagnostic pop
}

Expand Down

0 comments on commit b788189

Please sign in to comment.