[gtk] switch: Avoid problems with glyph availability



commit c1f79a935c580536470380f74b30670e258dfa42
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jan 23 12:02:27 2019 -0500

    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.

 gtk/gtkswitch.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gtk/gtkswitch.c b/gtk/gtkswitch.c
index 8ade76acdb..3c864b7ee2 100644
--- a/gtk/gtkswitch.c
+++ b/gtk/gtkswitch.c
@@ -288,12 +288,14 @@ gtk_switch_update_state_labels (GtkSwitch *sw)
   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 */
+    ""
   };
 
   GtkSwitchPrivate *priv = gtk_switch_get_instance_private (sw);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]