Fix nullptr dereference in client tests
Change-Id: I932cd20f17b5486a1161569c5e9a3feebabeee8e Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
This commit is contained in:
parent
88101641c0
commit
b127a86f1d
@ -245,7 +245,8 @@ QSharedPointer<MockOutput> MockCompositor::output(int index)
|
||||
{
|
||||
QSharedPointer<MockOutput> result;
|
||||
lock();
|
||||
result = m_compositor->outputs().at(index)->mockOutput();
|
||||
if (Impl::Output *output = m_compositor->outputs().value(index, nullptr))
|
||||
result = output->mockOutput();
|
||||
unlock();
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user