Commit 26f1552c authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen
Browse files

Directory: Don't attempt to access an uncached value

parent e055c79b
......@@ -61,8 +61,9 @@ std::shared_ptr<IDevice> CommonDirectory::device() const
if ( m_device.isCached() == false )
{
auto d = m_fsFactory.createDeviceFromMrl( mrl() );
if( d != nullptr )
m_device = std::move( d );
if( d == nullptr )
return nullptr;
m_device = std::move( d );
}
return m_device.get();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment