Avoid using NULL style provider
Fixes assertions with wxNotebook
This commit is contained in:
@@ -4690,9 +4690,12 @@ void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style)
|
|||||||
void wxWindowGTK::GTKApplyStyle(GtkWidget* widget, GtkRcStyle* WXUNUSED_IN_GTK3(style))
|
void wxWindowGTK::GTKApplyStyle(GtkWidget* widget, GtkRcStyle* WXUNUSED_IN_GTK3(style))
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK3__
|
#ifdef __WXGTK3__
|
||||||
GtkStyleContext* context = gtk_widget_get_style_context(widget);
|
if (m_styleProvider)
|
||||||
gtk_style_context_add_provider(context,
|
{
|
||||||
m_styleProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
GtkStyleContext* context = gtk_widget_get_style_context(widget);
|
||||||
|
gtk_style_context_add_provider(context,
|
||||||
|
m_styleProvider, GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
gtk_widget_modify_style(widget, style);
|
gtk_widget_modify_style(widget, style);
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user