[evolution] e-table-config: Fix runtime warning when changing sort direction



commit e51b22855959e1eaafc046deb235e005e4407163
Author: Milan Crha <mcrha redhat com>
Date:   Wed Feb 5 12:55:30 2020 +0100

    e-table-config: Fix runtime warning when changing sort direction
    
    Shown when no column was picked, due to passing NULL into the function.

 src/e-util/e-table-config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/e-util/e-table-config.c b/src/e-util/e-table-config.c
index 0243702ccc..b08e0e00e9 100644
--- a/src/e-util/e-table-config.c
+++ b/src/e-util/e-table-config.c
@@ -739,7 +739,9 @@ sort_ascending_toggled (GtkToggleButton *toggle_button,
                sort_type = GTK_SORT_DESCENDING;
 
        column = e_table_sort_info_sorting_get_nth (si, idx, NULL);
-       e_table_sort_info_sorting_set_nth (si, idx, column, sort_type);
+
+       if (column)
+               e_table_sort_info_sorting_set_nth (si, idx, column, sort_type);
 }
 
 static void


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