Fixed: first clearing a \r keqyEquivalent from one button and then setting it on another would result in an exception.

This commit is contained in:
Alexander Ljungberg
2010-07-21 14:57:52 -07:00
committed by Ross Boucher
parent 474623feb3
commit 4d1baac4db
+1 -1
View File
@@ -574,7 +574,7 @@ CPButtonStateMixed = CPThemeState("mixed");
if (aString === CPNewlineCharacter || aString === CPCarriageReturnCharacter)
[[self window] setDefaultButton:self];
else if ([[self window] defaultButton] === self)
[[self window] setDefaultButton:NO];
[[self window] setDefaultButton:nil];
_keyEquivalent = aString || @"";
}