[Xfce4-commits] <xfce4-weather-plugin:master> Fix crash in summary window when something weird happens.
Harald Judt
noreply at xfce.org
Tue Aug 7 12:02:01 CEST 2012
Updating branch refs/heads/master
to 51d98a68ee19e6f2cfa044727395bf1fcb9e4b32 (commit)
from 6a395f4829d7adbffa75e6abf62b0fa0df6e9e81 (commit)
commit 51d98a68ee19e6f2cfa044727395bf1fcb9e4b32
Author: Harald Judt <h.judt at gmx.at>
Date: Tue Aug 7 11:56:24 2012 +0200
Fix crash in summary window when something weird happens.
When no data is available or only partly available due to some
weird things happening, the plugin will crash on creating the
summary window. Prevent this by adding another safety check.
panel-plugin/weather-summary.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/panel-plugin/weather-summary.c b/panel-plugin/weather-summary.c
index 004a522..d660bef 100644
--- a/panel-plugin/weather-summary.c
+++ b/panel-plugin/weather-summary.c
@@ -777,7 +777,8 @@ create_summary_window (xfceweather_data *data)
if (G_LIKELY(icon))
g_object_unref(G_OBJECT(icon));
- if (data->location_name == NULL || data->weatherdata == NULL) {
+ if (data->location_name == NULL || data->weatherdata == NULL ||
+ data->weatherdata->current_conditions == NULL) {
hbox = gtk_hbox_new(FALSE, 0);
if (data->location_name == NULL)
label = gtk_label_new(_("Please set a location in the plugin settings."));
More information about the Xfce4-commits
mailing list