From 79412831126e49d990a44506af1ae69f78797d6c Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Thu, 24 Mar 2016 23:32:20 +0000 Subject: Weather: - minor fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@16539 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Weather/src/weather_mwin.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins/Weather/src/weather_mwin.cpp') 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); -- cgit v1.2.3