switch: Avoid problems with glyph availability

If none of the glyphs we want are available, fall
back to using empty strings here, rather than causing
critical warnings.
This commit is contained in:
Matthias Clasen
2019-01-23 12:02:27 -05:00
parent 2db6dbd192
commit 6a4ce55a69

View File

@@ -302,12 +302,14 @@ gtk_switch_create_pango_layouts (GtkSwitch *self)
const char *on_glyphs[] = {
"", /* U+23FD POWER ON SYMBOL */
"", /* U+2759 MEDIUM VERTICAL BAR */
""
};
/* Glyphs for the OFF state, in descending order of preference */
const char *off_glyphs[] = {
"", /* U+2B58 HEAVY CIRCLE */
"", /* U+25CB WHITE CIRCLE */
""
};
int i;