forked from AuroraMiddleware/gtk
inspector: Avoid a crash
I've seen the inspector crash when running on an X server without an xsettings manager around. Better be safe.
This commit is contained in:
parent
3469c639f6
commit
765fe201ce
@ -510,7 +510,7 @@ theme_to_pos (GBinding *binding,
|
|||||||
for (i = 0, n = g_list_model_get_n_items (G_LIST_MODEL (names)); i < n; i++)
|
for (i = 0, n = g_list_model_get_n_items (G_LIST_MODEL (names)); i < n; i++)
|
||||||
{
|
{
|
||||||
const char *name = gtk_string_list_get_string (names, i);
|
const char *name = gtk_string_list_get_string (names, i);
|
||||||
if (strcmp (name, theme) == 0)
|
if (g_strcmp0 (name, theme) == 0)
|
||||||
{
|
{
|
||||||
g_value_set_uint (to, i);
|
g_value_set_uint (to, i);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user