Comment 25 for bug 1005677

Revision history for this message
Albert Astals Cid (aacid) wrote : Re: Re-emergence of "Gtk-CRITICAL **: IA__gtk_widget_style_get: assertion `GTK_IS_WIDGET (widget)'" Makes vlc and other Qt apps crashing crashing

Changing the qgtkstyle_p.cpp code to

GtkWidget* QGtkStylePrivate::gtkWidget(const QHashableLatin1Literal &path)
{
    GtkWidget *widget = gtkWidgetMap()->value(path);
    if (!widget) {
        // Theme might have rearranged widget internals
        widget = gtkWidgetMap()->value(path);
    }
    if (!widget) {
        const QString name = path.toString();
        if (name == QLatin1String("GtkHScrollbar") || name == QLatin1String("GtkVScrollbar"))
            widget = gtkWidgetMap()->value("OsScrollbar");
    }
    return widget;
}

Fixes the crashes for me, but it still means that the overlay-scrollbar code is being used (even the scrollbars look normal).

Andrea that is the one that did the code is back from holidays tomorrow, I'll try to have a talk with him on how to fix it in a way that's best for everyone.