If we get an invalid TARGETS reply, we might not have a valid 'type',
which ends up as NULL and segs in the g_str_equal.
(This is probably fallout from my fix
506566b6a4c3a9, which I still
can't reproduce reliably, so the last one just moved the seg a bit
further along, and we still don't know who is sending a bad TARGETS).
This corresponds to:
https://bugzilla.redhat.com/show_bug.cgi?id=
2062143
g_error_free (error);
return;
}
- else if (!g_str_equal (type, "ATOM") || format != 32)
+ else if (g_strcmp0 (type, "ATOM") != 0 || format != 32)
{
GDK_DISPLAY_NOTE (display, CLIPBOARD, g_printerr ("%s: Wrong reply type to TARGETS: type %s != ATOM or format %d != 32\n",
- cb->selection, type, format));
+ cb->selection, type ? type : "NULL", format));
g_input_stream_close (stream, NULL, NULL);
g_object_unref (stream);
g_object_unref (cb);