Check pointer is initialized before using it

I see a few crash reports that indicate this code is called without a valid ‘bundleItemContent’, though unsure how to reproduce.
This commit is contained in:
Allan Odgaard
2013-08-25 19:09:02 +02:00
parent e27f9f4071
commit 896416c3e9

View File

@@ -240,7 +240,7 @@ static be::entry_ptr parent_for_column (NSBrowser* aBrowser, NSInteger aColumn,
- (void)didChangeModifiedState
{
[self setDocumentEdited:bundleItem && (changes.find(bundleItem) != changes.end() || propertiesChanged || bundleItemContent->is_modified())];
[self setDocumentEdited:bundleItem && (changes.find(bundleItem) != changes.end() || propertiesChanged || (bundleItemContent && bundleItemContent->is_modified()))];
}
// ==================