kstyle: Remove superfluous null pointer check of painter

Fixes code quality issue "Either the condition 'painter' is redundant or
there is possible null pointer dereference: painter."
wilder
Ingo Klöcker 4 years ago committed by Ingo Klöcker
parent 8c00371a77
commit c7dff412bb
  1. 2
      kstyle/breezestyle.cpp

@ -3986,7 +3986,7 @@ bool Style::drawPanelMenuPrimitive(const QStyleOption *option, QPainter *painter
painter->save();
if (StyleConfigData::menuOpacity() < 100) {
if (painter && widget && widget->isWindow()) {
if (widget && widget->isWindow()) {
painter->setCompositionMode(QPainter::CompositionMode_Source);
}
background.setAlphaF(StyleConfigData::menuOpacity() / 100.0);

Loading…
Cancel
Save