Index: src/MenuItem.m ================================================================== --- src/MenuItem.m +++ src/MenuItem.m @@ -16,12 +16,21 @@ MenuItem *otherItem; if (![otherObject isKindOfClass:MenuItem.class]) @throw [OFInvalidArgumentException exception]; - int x = (int)_text.longLongValue; - int y = (int)otherItem.text.longLongValue; + int x, y; + @try { + x = (int)_text.longLongValue; + } @catch (OFInvalidFormatException *e) { + x = 0; + } + @try { + y = (int)otherItem.text.longLongValue; + } @catch (OFInvalidFormatException *e) { + y = 0; + } if (x > y) return OFOrderedAscending; if (x < y) return OFOrderedDescending;