diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2013-01-05 19:53:50 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2013-01-05 19:53:50 +0000 |
commit | 11112c57c6701f2233307b110cd2961efaf2fb00 (patch) | |
tree | 4dd8119ca4933f4d4a3e0ee15ce52d85814fbef5 /plugins/Weather | |
parent | eb3fe620e910ea65bd8ee73f2855e77ddcbf4992 (diff) |
temporary fix for a crash in AddContact (fixes #156)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2983 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather')
-rw-r--r-- | plugins/Weather/src/weather_addstn.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp index 4cc2a34a90..22cf2b5ddc 100644 --- a/plugins/Weather/src/weather_addstn.cpp +++ b/plugins/Weather/src/weather_addstn.cpp @@ -35,7 +35,9 @@ static TCHAR name1[256]; INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam)
{
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)lParam;
- WIDATA *sData;
+
+ if(!psr || !psr->email)
+ return 0;
// search for existing contact
HANDLE hContact = db_find_first();
@@ -75,7 +77,7 @@ INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam) GetSvc(svc);
// set settings by obtaining the default for the service
if (psr->lastName[0] != 0) {
- sData = GetWIData(svc);
+ WIDATA *sData = GetWIData(svc);
db_set_ts(hContact, WEATHERPROTONAME, "MapURL", sData->DefaultMap);
db_set_s(hContact, WEATHERPROTONAME, "InfoURL", sData->DefaultURL);
}
|