[gtk/matthiasc/for-master: 2/3] inspector: Avoid a crash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 2/3] inspector: Avoid a crash
- Date: Sat, 8 Aug 2020 22:34:23 +0000 (UTC)
commit 765fe201ceb9ff9182298fc905a57f694307ba4e
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Aug 8 18:05:21 2020 -0400
inspector: Avoid a crash
I've seen the inspector crash when running on an
X server without an xsettings manager around. Better
be safe.
gtk/inspector/visual.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/inspector/visual.c b/gtk/inspector/visual.c
index fe8bc9954d..7cc933ff2a 100644
--- a/gtk/inspector/visual.c
+++ b/gtk/inspector/visual.c
@@ -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++)
{
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);
return TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]