From 28be2d82341315b358f81c76c16de469167e9b12 Mon Sep 17 00:00:00 2001 From: Scoopta Date: Fri, 7 Feb 2020 18:07:46 -0800 Subject: [PATCH] Fixed a null check that itself would cause a segfault --- src/wofi.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/wofi.c b/src/wofi.c index 197c5e6..e09a1ef 100644 --- a/src/wofi.c +++ b/src/wofi.c @@ -850,12 +850,7 @@ static gint do_sort(GtkFlowBoxChild* child1, GtkFlowBoxChild* child2, gpointer d } } if(text1 == NULL || text2 == NULL) { - switch(sort_order) { - case SORT_ORDER_DEFAULT: - return index1 - index2; - case SORT_ORDER_ALPHABETICAL: - return strcmp(text1, text2); - } + return index1 - index2; } switch(matching) {