Commit f894976e authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

xwayland: Don't start Xwayland if it's already running

If the Xwayland server is being started or has already been started, do
nothing in the start() function. Normally, we would never encounter such
situation, but if we do, this check will be very useful in preventing
hitting undefined behavior in the compositor.
parent a6ff3001
......@@ -84,6 +84,10 @@ QProcess *Xwayland::process() const
void Xwayland::start()
{
if (m_xwaylandProcess) {
return;
}
int pipeFds[2];
if (pipe(pipeFds) != 0) {
std::cerr << "FATAL ERROR failed to create pipe to start Xwayland " << std::endl;
......
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