blob: 7e990ee9c5ae8377b2396654a993d78e87e351ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
mostly the equivalent of the new upstream version:
https://github.com/transmission/transmission/blob/e14c7f38e59f89c5c6a67c1596a0e548869b7e9d/gtk/FilterBar.cc#L530
--- a/gtk/filter.c
+++ b/gtk/filter.c
@@ -599,7 +599,9 @@
for (size_t i = 0; i < G_N_ELEMENTS(types); ++i)
{
- char const* name = types[i].context != NULL ? g_dpgettext2(NULL, types[i].context, types[i].name) : _(types[i].name);
+ char const* name = types[i].name ?
+ types[i].context != NULL ? g_dpgettext2(NULL, types[i].context, types[i].name) : _(types[i].name)
+ : "\0";
gtk_list_store_insert_with_values(store, NULL, -1,
ACTIVITY_FILTER_COL_NAME, name,
ACTIVITY_FILTER_COL_TYPE, types[i].type,
|