diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2022-11-14 02:30:15 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2022-11-14 02:30:15 +0100 |
commit | f6096c1762cffc7ee23f70dbdb70b79a90b1c4e1 (patch) | |
tree | ad55bec4f60c120ab20c047c8d3edf441423cf9c /src/ui/picker.c | |
parent | 790193d7f837b75b9f932b0ca313dacce3c005f9 (diff) | |
download | messenger-gtk-f6096c1762cffc7ee23f70dbdb70b79a90b1c4e1.tar.gz messenger-gtk-f6096c1762cffc7ee23f70dbdb70b79a90b1c4e1.zip |
Fix potential crash by unsafe gst pipeline and improve unicode character handling
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/ui/picker.c')
-rw-r--r-- | src/ui/picker.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/picker.c b/src/ui/picker.c index bdaa713..09ccf09 100644 --- a/src/ui/picker.c +++ b/src/ui/picker.c | |||
@@ -51,10 +51,14 @@ _add_emoji_buttons(GtkFlowBox *flow_box, | |||
51 | GString *string = g_string_new(""); | 51 | GString *string = g_string_new(""); |
52 | g_string_append_unichar(string, (gunichar) characters[i]); | 52 | g_string_append_unichar(string, (gunichar) characters[i]); |
53 | 53 | ||
54 | gchar *_text = g_locale_to_utf8(string->str, string->len, NULL, NULL, NULL); | ||
55 | |||
54 | GtkButton *emoji_button = GTK_BUTTON( | 56 | GtkButton *emoji_button = GTK_BUTTON( |
55 | gtk_button_new_with_label(string->str) | 57 | gtk_button_new_with_label(string->str) |
56 | ); | 58 | ); |
57 | 59 | ||
60 | g_free(_text); | ||
61 | |||
58 | gtk_button_set_relief(emoji_button, GTK_RELIEF_NONE); | 62 | gtk_button_set_relief(emoji_button, GTK_RELIEF_NONE); |
59 | 63 | ||
60 | g_signal_connect( | 64 | g_signal_connect( |