Commit 2da0aa0d authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

File: Assert that a valid file always has an associated media

parent b44c41ad
......@@ -166,6 +166,7 @@ std::shared_ptr<Media> File::media() const
if ( m_media.isCached() == false )
{
m_media = Media::fetch( m_ml, m_mediaId );
assert( isDeleted() == true || m_media.get() != nullptr );
}
return m_media.get().lock();
}
......
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