From e047d458fd3933a5cccf336721e9951afe74b481 Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Mon, 11 Feb 2013 14:21:20 +0100 Subject: [PATCH] Fix crash in bundle editor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Frameworks/BundleEditor/src/BundleEditor.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Frameworks/BundleEditor/src/BundleEditor.mm b/Frameworks/BundleEditor/src/BundleEditor.mm index a040d5b9..ab65db18 100644 --- a/Frameworks/BundleEditor/src/BundleEditor.mm +++ b/Frameworks/BundleEditor/src/BundleEditor.mm @@ -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];