summaryrefslogtreecommitdiffstats
path: root/widget/gtk
diff options
context:
space:
mode:
authortrav90 <travawine@protonmail.ch>2018-04-06 11:03:35 -0500
committertrav90 <travawine@protonmail.ch>2018-04-06 11:03:35 -0500
commite7b059d9439b1b0358055d9cc6b78f35fd9be533 (patch)
treed631562e8884f8abec130be6d0a592eb88b51aab /widget/gtk
parent5ddda9321c7d5b2971f0fb20711c8160a763511e (diff)
downloadUXP-e7b059d9439b1b0358055d9cc6b78f35fd9be533.tar
UXP-e7b059d9439b1b0358055d9cc6b78f35fd9be533.tar.gz
UXP-e7b059d9439b1b0358055d9cc6b78f35fd9be533.tar.lz
UXP-e7b059d9439b1b0358055d9cc6b78f35fd9be533.tar.xz
UXP-e7b059d9439b1b0358055d9cc6b78f35fd9be533.zip
[GTK3] Don't invalidate style content for missing widgets
Diffstat (limited to 'widget/gtk')
-rw-r--r--widget/gtk/WidgetStyleCache.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/widget/gtk/WidgetStyleCache.cpp b/widget/gtk/WidgetStyleCache.cpp
index 7e5488b49..301d93db3 100644
--- a/widget/gtk/WidgetStyleCache.cpp
+++ b/widget/gtk/WidgetStyleCache.cpp
@@ -626,6 +626,10 @@ GetWidget(WidgetNodeType aWidgetType)
GtkWidget* widget = sWidgetStorage[aWidgetType];
if (!widget) {
widget = CreateWidget(aWidgetType);
+ // Some widgets (MOZ_GTK_COMBOBOX_SEPARATOR for instance) may not be
+ // available or implemented.
+ if (!widget)
+ return nullptr;
// In GTK versions prior to 3.18, automatic invalidation of style contexts
// for widgets was delayed until the next resize event. Gecko however,
// typically uses the style context before the resize event runs and so an