Add another pixmap safety check in Shadow creation
Do not only check for null pixmaps but also that the pixmap contains a 32 bit depth as we don't want shadows without alpha.
This commit is contained in:
parent
a3962f895d
commit
911b037fe8
1 changed files with 1 additions and 1 deletions
|
@ -100,7 +100,7 @@ bool Shadow::init(const QVector< long > &data)
|
||||||
{
|
{
|
||||||
for (int i=0; i<ShadowElementsCount; ++i) {
|
for (int i=0; i<ShadowElementsCount; ++i) {
|
||||||
QPixmap pix = QPixmap::fromX11Pixmap(data[i]);
|
QPixmap pix = QPixmap::fromX11Pixmap(data[i]);
|
||||||
if (pix.isNull()) {
|
if (pix.isNull() || pix.depth() != 32) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_shadowElements[i] = pix.copy(0, 0, pix.width(), pix.height());
|
m_shadowElements[i] = pix.copy(0, 0, pix.width(), pix.height());
|
||||||
|
|
Loading…
Reference in a new issue