diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index fd76da760f..9bd0dc994e 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -4370,7 +4370,8 @@ void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style) { if (m_wxwindow) gtk_widget_modify_style(m_wxwindow, style); - gtk_widget_modify_style(m_widget, style); + else + gtk_widget_modify_style(m_widget, style); } bool wxWindowGTK::SetBackgroundStyle(wxBackgroundStyle style) diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index fd76da760f..9bd0dc994e 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -4370,7 +4370,8 @@ void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style) { if (m_wxwindow) gtk_widget_modify_style(m_wxwindow, style); - gtk_widget_modify_style(m_widget, style); + else + gtk_widget_modify_style(m_widget, style); } bool wxWindowGTK::SetBackgroundStyle(wxBackgroundStyle style)