Commit 65ee5661 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

ManhattanStyle: Validate widget before dereferencing

Change-Id: Id32e59f96ed8a94f08eb0effbca4918e11659c06
Reviewed-by: default avatarEike Ziller <>
parent bf31eb51
......@@ -789,11 +789,12 @@ void ManhattanStyle::drawControl(ControlElement element, const QStyleOption *opt
bool horizontal = option->state & State_Horizontal;
// Map offset for global window gradient
QRect gradientSpan;
if (widget) {
QPoint offset = widget->window()->mapToGlobal(option->rect.topLeft()) -
QRect gradientSpan;
if (widget)
gradientSpan = QRect(offset, widget->window()->size());
bool drawLightColored = lightColored(widget);
if (horizontal)
Supports Markdown
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