Should this also check if m_media != 0 before calling g_object_unref(m_media)?