st-widget: Add missing g_return_val_if_fail()

It's a public function, so it's good practice to sanity-check its
input (unless disabled at compile time of course).

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1018
This commit is contained in:
Florian Müllner 2019-03-05 19:42:01 +01:00 committed by Marco Trevisan
parent 436861edc8
commit 706bdd8059

View File

@ -579,7 +579,11 @@ get_root_theme_node (ClutterStage *stage)
StThemeNode *
st_widget_get_theme_node (StWidget *widget)
{
StWidgetPrivate *priv = st_widget_get_instance_private (widget);
StWidgetPrivate *priv;
g_return_val_if_fail (ST_IS_WIDGET (widget), NULL);
priv = st_widget_get_instance_private (widget);
if (priv->theme_node == NULL)
{