[Xfce4-commits] <xfce4-weather-plugin:master> Fix check for missing latitude or longitude.

Harald Judt noreply at xfce.org
Wed Jul 18 12:06:01 CEST 2012


Updating branch refs/heads/master
         to 59801b00e373b4e383711cd886e2e199b8d833bb (commit)
       from 1bb5cc97419fa119bb271456815bf8cfac769116 (commit)

commit 59801b00e373b4e383711cd886e2e199b8d833bb
Author: Harald Judt <h.judt at gmx.at>
Date:   Wed Jul 18 11:59:42 2012 +0200

    Fix check for missing latitude or longitude.

 panel-plugin/weather.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index 3d0ec42..a2c4f4e 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -439,7 +439,8 @@ static gboolean
 update_weatherdata (xfceweather_data *data)
 {
   gchar *url;
-  if (!data->lat || !data->lon)
+  if ((!data->lat || !data->lon)
+      || strlen(data->lat) == 0 || strlen(data->lon) == 0)
     {
       gtk_scrollbox_clear (GTK_SCROLLBOX (data->scrollbox));
       set_icon_error (data);


More information about the Xfce4-commits mailing list