From 896416c3e997bf611dd1275244e2fbd1f184550d Mon Sep 17 00:00:00 2001 From: Allan Odgaard Date: Sun, 25 Aug 2013 19:09:02 +0200 Subject: [PATCH] Check pointer is initialized before using it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I see a few crash reports that indicate this code is called without a valid ‘bundleItemContent’, though unsure how to reproduce. --- 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 41587843..901bc145 100644 --- a/Frameworks/BundleEditor/src/BundleEditor.mm +++ b/Frameworks/BundleEditor/src/BundleEditor.mm @@ -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()))]; } // ==================