diff options
author | Benjamin Berg <bberg@redhat.com> | 2021-02-18 15:38:13 +0100 |
---|---|---|
committer | Benjamin Berg <bberg@redhat.com> | 2021-02-18 15:39:28 +0100 |
commit | 12a445e7f003b0a87001121dd6ff1d4ad8d784de (patch) | |
tree | 92c9ec0965ca3505a702e784d1f11d35f4444469 | |
parent | e43f866d9b09ac31a91dcaa950754b962557969e (diff) | |
download | libgweather-12a445e7f003b0a87001121dd6ff1d4ad8d784de.tar.gz |
location-entry: Fix possible uninitialized variable
The scope variable needs to be initialized to NULL so that the fallback
correctly kicks in when a lookup by country code was not tried.
Fixes: #79
-rw-r--r-- | libgweather/gweather-location-entry.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgweather/gweather-location-entry.c b/libgweather/gweather-location-entry.c index 1514144..5f55f77 100644 --- a/libgweather/gweather-location-entry.c +++ b/libgweather/gweather-location-entry.c @@ -735,7 +735,7 @@ match_selected (GtkEntryCompletion *completion, char *display_name; GeocodeLocation *loc; GWeatherLocation *location; - GWeatherLocation *scope; + GWeatherLocation *scope = NULL; const char* country_code; gtk_tree_model_get (model, iter, |