effects/trackmouse: Fix texture check

Both texture and image cannot be not null as they are initialized based
on compositing type.

BUG: 439859
This commit is contained in:
Vlad Zahorodnii 2021-09-23 13:19:22 +03:00
parent c83a5daf2b
commit 67b94586c4

View file

@ -146,9 +146,9 @@ void TrackMouseEffect::postPaintScreen()
bool TrackMouseEffect::init()
{
effects->makeOpenGLContextCurrent();
if (!m_texture[0] || m_image[0].isNull()) {
if (!m_texture[0] && m_image[0].isNull()) {
loadTexture();
if (!m_texture[0] || m_image[0].isNull())
if (!m_texture[0] && m_image[0].isNull())
return false;
}
m_lastRect[0].moveCenter(cursorPos());