summaryrefslogtreecommitdiff
path: root/plugins/Weather/src/weather_mwin.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2016-03-24 23:32:20 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2016-03-24 23:32:20 +0000
commit79412831126e49d990a44506af1ae69f78797d6c (patch)
tree9b08aab70ee1be9fc36adb51cf4d3f4337991383 /plugins/Weather/src/weather_mwin.cpp
parent2e7f9dcf085ba41ab37bd3234c5fd27781896114 (diff)
Weather: - minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@16539 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Weather/src/weather_mwin.cpp')
-rw-r--r--plugins/Weather/src/weather_mwin.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp
index 2dc78a8975..dd4f4f3029 100644
--- a/plugins/Weather/src/weather_mwin.cpp
+++ b/plugins/Weather/src/weather_mwin.cpp
@@ -167,7 +167,8 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
fntc1 = CallService(MS_FONT_GETT, (WPARAM)&fntid, (LPARAM)&lfnt1);
}
- db_get_ts(data->hContact, WEATHERCONDITION, "WeatherInfo", &dbv);
+ if (db_get_ts(data->hContact, WEATHERCONDITION, "WeatherInfo", &dbv))
+ break;
GetClientRect(hwnd, &rc);
@@ -240,7 +241,8 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
static void addWindow(MCONTACT hContact)
{
DBVARIANT dbv;
- db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv);
+ if (db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv))
+ return;
TCHAR winname[512];
mir_sntprintf(winname, _T("Weather: %s"), dbv.ptszVal);