Use to_s instead of fileSystemRepresentation to guard against nil

This commit is contained in:
Allan Odgaard
2014-10-09 11:30:22 +02:00
parent b876a6a577
commit 56be5a90cd

View File

@@ -58,7 +58,7 @@
{
encoding::type res = _encodingOptions;
settings_t const& settings = settings_for_path([[[anURL filePathURL] path] fileSystemRepresentation]);
settings_t const& settings = settings_for_path(to_s([[anURL filePathURL] path]));
if(res.charset() == kCharsetNoEncoding)
{
res.set_charset(settings.get(kSettingsEncodingKey, kCharsetUTF8));