0001-st-Be-more-forgiving-when-calling-get_theme_node-on-.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From ace549c1bf1861b4cbaec6f2451a6341aa738bae Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
  3. Date: Mon, 24 Jun 2013 18:09:04 +0200
  4. Subject: [PATCH] st: Be more forgiving when calling get_theme_node() on
  5. unstaged widgets
  6. While it is obviously still an error to call get_theme_node() on a
  7. widget that hasn't been added to the stage hierarchy yet, asserting
  8. on it hasn't proven too successful in avoiding those errors - it's
  9. likely the most frequent reason for crash reports. Just accept that
  10. there'll always be code paths where we can hit this case and make
  11. it non-fatal.
  12. https://bugzilla.gnome.org/show_bug.cgi?id=610279
  13. ---
  14. src/st/st-widget.c | 5 +++--
  15. 1 file changed, 3 insertions(+), 2 deletions(-)
  16. diff --git a/src/st/st-widget.c b/src/st/st-widget.c
  17. index 42992ec..4875acc 100644
  18. --- a/src/st/st-widget.c
  19. +++ b/src/st/st-widget.c
  20. @@ -608,8 +608,9 @@ st_widget_get_theme_node (StWidget *widget)
  21. if (stage == NULL)
  22. {
  23. - g_error ("st_widget_get_theme_node called on the widget %s which is not in the stage.",
  24. - st_describe_actor (CLUTTER_ACTOR (widget)));
  25. + g_critical ("st_widget_get_theme_node called on the widget %s which is not in the stage.",
  26. + st_describe_actor (CLUTTER_ACTOR (widget)));
  27. + return g_object_new (ST_TYPE_THEME_NODE, NULL);
  28. }
  29. if (parent_node == NULL)
  30. --
  31. 1.8.3.1