diff options
-rw-r--r-- | e-util/e-util.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/e-util/e-util.c b/e-util/e-util.c index 8f393e1b86..18975375e6 100644 --- a/e-util/e-util.c +++ b/e-util/e-util.c @@ -40,7 +40,14 @@ int g_str_compare(const void *x, const void *y) { - return strcmp(x, y); + if (x == NULL || y == NULL) { + if (x == y) + return 0; + else + return x ? -1 : 1; + } + + return strcmp(x, y); } int |