Skip to content

Commit 6f6a176

Browse files
committed
Fixes jenswilly#1: <pin> without length
1 parent a12760e commit 6f6a176

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

EAGLEView/Models/EAGLEDrawablePin.m

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ - (id)initFromXMLElement:(DDXMLElement *)element inFile:(EAGLEFile *)file
3737

3838
// Length
3939
NSString *lengthString = [[element attributeForName:@"length"] stringValue];
40+
41+
// If there is no length, default to short (#1)
42+
if( !lengthString )
43+
lengthString = @"short";
44+
4045
if( [lengthString isEqualToString:@"short"] )
4146
_length = EAGLEDrawablePinLength_Short;
4247
else if( [lengthString isEqualToString:@"middle"] )

0 commit comments

Comments
 (0)