Fix crash in bundle editor

I have added a check to ensure we have the bundle item content (in addition to the bundle item) which fixes #774 although it is unclear to me how the bundle editor would end up in a state where it has a bundle item but no content for that item. There is a window in the setBundleItem: method where the bundle item content hasn’t yet been setup, but commitEditing is not called during that window.
This commit is contained in:
Allan Odgaard
2013-02-11 14:21:20 +01:00
parent f980573d8b
commit e047d458fd

View File

@@ -367,7 +367,7 @@ static be::entry_ptr parent_for_column (NSBrowser* aBrowser, NSInteger aColumn,
- (BOOL)commitEditing
{
if(!bundleItem)
if(!bundleItem || !bundleItemContent)
return YES;
[sharedPropertiesViewController commitEditing];