File geocode-glib-boo1169163.patch of Package geocode-glib.14740

diff -urp geocode-glib-3.20.1.orig/geocode-glib/geocode-forward.c geocode-glib-3.20.1/geocode-glib/geocode-forward.c
--- geocode-glib-3.20.1.orig/geocode-glib/geocode-forward.c	2016-03-21 12:54:59.000000000 -0500
+++ geocode-glib-3.20.1/geocode-glib/geocode-forward.c	2020-04-10 15:12:13.056738692 -0500
@@ -745,9 +745,11 @@ get_place_type_from_attributes (GHashTab
                 place_type =  GEOCODE_PLACE_TYPE_DRAINAGE;
         } else if (g_strcmp0 (category, "boundary") == 0) {
                 if (g_strcmp0 (type, "administrative") == 0) {
+                        const char *place_rank;
                         int rank;
 
-                        rank = atoi (g_hash_table_lookup (ht, "place_rank"));
+                        place_rank = g_hash_table_lookup (ht, "place_rank");
+                        rank = place_rank ? atoi (place_rank) : 0;
                         if (rank < 2)
                                 place_type =  GEOCODE_PLACE_TYPE_UNKNOWN;
 
Only in geocode-glib-3.20.1/geocode-glib: geocode-forward.c.orig
openSUSE Build Service is sponsored by