[gtk+/gtk-3-22] Revert "css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] Revert "css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()"
- Date: Sun, 17 Dec 2017 16:21:38 +0000 (UTC)
commit f44af2e6ae0c023b94794f790a62dc490922eba5
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Dec 17 11:20:15 2017 -0500
Revert "css: Fix segfault when GtkCssStyleChange is NULL on gtk_widget_real_style_updated()"
This reverts commit 7e253f4bd3977a67cf7040ce11e24b9d06100f6a.
gtk/gtkwidget.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ff6d59d..ee4ae27 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8162,15 +8162,12 @@ static void
gtk_widget_real_style_updated (GtkWidget *widget)
{
GtkWidgetPrivate *priv = widget->priv;
- GtkCssStyleChange *change = NULL;
gtk_widget_update_alpha (widget);
if (widget->priv->context)
- change = gtk_style_context_get_change (widget->priv->context);
-
- if (change)
{
+ GtkCssStyleChange *change = gtk_style_context_get_change (widget->priv->context);
const gboolean has_text = gtk_widget_peek_pango_context (widget) != NULL;
if (has_text && gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT))
@@ -8178,7 +8175,8 @@ gtk_widget_real_style_updated (GtkWidget *widget)
if (widget->priv->anchored)
{
- if (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_SIZE) ||
+ if (change == NULL ||
+ gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_SIZE) ||
(has_text && gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT_SIZE)))
{
gtk_widget_queue_resize (widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]