Commit 2aa08ed3 authored by David Edmundson's avatar David Edmundson Committed by Nate Graham
Browse files

[kstyle] Fix logic error in drawIndicatorButtonDropDownPrimitive

The current code checks for !complexOption, but then continues to
de-reference it in the second clause of the statement leading to an
inveitable crash.

I assume it's meant to be an `or` for the latter part of the statement
to make sense.

(cherry picked from commit b09dbd92)
parent 4b9eb1e7
......@@ -4024,7 +4024,7 @@ namespace Breeze
// cast option and check
const auto complexOption( qstyleoption_cast<const QStyleOptionComplex*>( option ) );
if( !complexOption && !(complexOption->subControls & SC_ToolButtonMenu) ) return true;
if( !complexOption || !(complexOption->subControls & SC_ToolButtonMenu) ) return true;
// button state
bool enabled = option->state & QStyle::State_Enabled;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment