Permalink
Browse files

fixup! Allow disabling document status in file browser

If ‘location’ was nil, we would implicitly create a std::string from that, which is not allowed (and crashes).
  • Loading branch information...
1 parent f9705ff commit c995b758c8f544a6b69d5684fdfe91064c690ffb @sorbits sorbits committed Nov 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Frameworks/OakFileBrowser/src/OakFileBrowser.mm
@@ -203,7 +203,7 @@ - (NSArray*)openURLs
- (void)setOpenURLs:(NSArray*)newOpenURLs
{
- if(!settings_for_path(NULL_STR, "", [self.location UTF8String]).get(kSettingsFileBrowserDocumentStatusKey, true))
+ if(!settings_for_path(NULL_STR, "", to_s(self.location)).get(kSettingsFileBrowserDocumentStatusKey, true))
return;
if([outlineViewDelegate.openURLs isEqualToArray:newOpenURLs])
@@ -220,7 +220,7 @@ - (NSArray*)modifiedURLs
- (void)setModifiedURLs:(NSArray*)newModifiedURLs
{
- if(!settings_for_path(NULL_STR, "", [self.location UTF8String]).get(kSettingsFileBrowserDocumentStatusKey, true))
+ if(!settings_for_path(NULL_STR, "", to_s(self.location)).get(kSettingsFileBrowserDocumentStatusKey, true))
return;
if([outlineViewDelegate.modifiedURLs isEqualToArray:newModifiedURLs])

0 comments on commit c995b75

Please sign in to comment.