]> birchwood-abbey.net Git - mit-scheme.git/commitdiff
glib: Fix run_glib to handle a NULL (not a "") from gpollfds_string.
authorMatt Birkholz <matt@birchwood-abbey.net>
Fri, 28 Oct 2022 00:07:39 +0000 (17:07 -0700)
committerMatt Birkholz <matt@birchwood-abbey.net>
Fri, 28 Oct 2022 00:07:39 +0000 (17:07 -0700)
src/glib/glibio.c

index b831f6c0ccc71870261e3ac81440db9251937b5d..4e80f4b3d5e4bd1d417b034d57aeca9043f23a69 100644 (file)
@@ -376,9 +376,11 @@ run_glib (unsigned long registry, double time)
       GSList * gpollfds = scheme_source->gpollfds;
       gchar * fdstr = gpollfds_string (gpollfds);
       fprintf (stderr, ";run_glib%s%s until %.1f\n",
-              gpollfds == NULL ? "" : " waiting on", fdstr, time);
+              gpollfds == NULL ? "" : " waiting on",
+              fdstr == NULL ? "" : fdstr,
+              time);
       fflush (stderr);
-      if (fdstr[0] != '\0')
+      if (fdstr != NULL)
        g_free (fdstr);
     }