Skip to content
Snippets Groups Projects
Commit cfb14b4d authored by Pierre Lamot's avatar Pierre Lamot Committed by Jean-Baptiste Kempf
Browse files

qt: destroy the current compositor when it's unable to create an interface

parent d5102812
No related branches found
No related tags found
1 merge request!765qt: X11 video compositor V2
......@@ -85,7 +85,11 @@ Compositor* CompositorFactory::createCompositor()
{
Compositor* compositor = compositorList[m_compositorIndex].instanciate(m_intf);
if (compositor->init())
{
//avoid looping over the same compositor if the current ones fails further initialisation steps
m_compositorIndex++;
return compositor;
}
}
}
msg_Err(m_intf, "no suitable compositor found");
......
......@@ -772,7 +772,11 @@ static void *Thread( void *obj )
break;
ret = p_intf->p_compositor->makeMainInterface(p_intf->p_mi);
if (!ret)
{
p_intf->p_compositor->destroyMainInterface();
delete p_intf->p_compositor;
p_intf->p_compositor = nullptr;
}
} while(!ret);
if (!ret)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment