Since background is a pointer, it should have a NULL check before dereferencing.
if (background != NULL && !background->isNull()) {
}
would be an option, but I assume that QLabel::setPixmap would ignore null or empty pixmaps anyway.
Since background is a pointer, it should have a NULL check before dereferencing.
if (background != NULL && !background- >isNull( )) {
}
would be an option, but I assume that QLabel::setPixmap would ignore null or empty pixmaps anyway.