~ubuntu-branches/ubuntu/oneiric/cairo-dock-plug-ins/oneiric-updates

« back to all changes in this revision

Viewing changes to debian/patches/02-weather-fix_upstream-version-2.3.0~2.2.patch

  • Committer: Kees Cook
  • Date: 2011-08-11 23:17:39 UTC
  • mfrom: (20.1.1 cairo-dock-plug-ins)
  • Revision ID: kees@outflux.net-20110811231739-cteedan51tmdg77v
Tags: 2.4.0~0beta2-0ubuntu1
releasing version 2.4.0~0beta2-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Matthieu Baerts <matttbe@gmail.com>
2
 
Subject: Weather: prevent a crash if there is an error (thanks to Tsu Jan)
3
 
Origin: upstream, http://bazaar.launchpad.net/~cairo-dock-team/cairo-dock-plug-ins/2.3.x/revision/1940
4
 
Bug: https://bugs.launchpad.net/ubuntu/+source/cairo-dock-plug-ins/+bug/788437
5
 
Forwarded: yes
6
 
 
7
 
Index: cairo-dock-plug-ins/weather/src/applet-read-data.c
8
 
===================================================================
9
 
--- cairo-dock-plug-ins.orig/weather/src/applet-read-data.c     2011-06-04 02:16:45.821196928 +0200
10
 
+++ cairo-dock-plug-ins/weather/src/applet-read-data.c  2011-06-04 02:17:05.891226364 +0200
11
 
@@ -304,13 +304,13 @@
12
 
        {
13
 
                gchar *cURL = g_strdup_printf (CD_WEATHER_BASE_URL"/weather/local/%s?cc=*%s", pSharedMemory->cLocationCode, (pSharedMemory->bISUnits ? "&unit=m" : ""));
14
 
                cCCData = cairo_dock_get_url_data (cURL, &erreur);
15
 
-               g_free (cURL);
16
 
                if (erreur != NULL)
17
 
                {
18
 
                        cd_warning ("while downloading current conditions data:\n%s -> %s", cURL, erreur->message);
19
 
                        g_error_free (erreur);
20
 
                        erreur = NULL;
21
 
                }
22
 
+               g_free (cURL);
23
 
                if (cCCData == NULL)
24
 
                {
25
 
                        pSharedMemory->bErrorInThread = TRUE;
26
 
@@ -324,7 +324,6 @@
27
 
        {
28
 
                gchar *cURL = g_strdup_printf (CD_WEATHER_BASE_URL"/weather/local/%s?dayf=%d%s", pSharedMemory->cLocationCode, pSharedMemory->iNbDays, (pSharedMemory->bISUnits ? "&unit=m" : ""));
29
 
                cForecastData = cairo_dock_get_url_data (cURL, &erreur);
30
 
-               g_free (cURL);
31
 
                if (erreur != NULL)
32
 
                {
33
 
                        cd_warning ("while downloading forecast data:\n%s ->  %s", cURL, erreur->message);
34
 
@@ -332,6 +331,7 @@
35
 
                        erreur = NULL;
36
 
                        pSharedMemory->bErrorInThread = TRUE;
37
 
                }
38
 
+               g_free (cURL);
39
 
                if (cForecastData == NULL)
40
 
                {
41
 
                        pSharedMemory->bErrorInThread = TRUE;