Merge pull request #2148 from zittix/patch-2

Fixed: Crash of press tool due to theme attribute not set
This commit is contained in:
Aparajita Fishman
2014-06-24 13:15:29 -04:00
+1 -1
View File
@@ -774,7 +774,7 @@ function CPThemeAttributeDecode(aCoder, anAttributeName, aDefaultValue, aTheme,
{
var attribute = [aCoder decodeObjectForKey:key];
if (!attribute.isa || ![attribute isKindOfClass:[_CPThemeAttribute class]])
if (!attribute || !attribute.isa || ![attribute isKindOfClass:[_CPThemeAttribute class]])
{
var themeAttribute = [[_CPThemeAttribute alloc] initWithName:anAttributeName defaultValue:aDefaultValue];