summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/BuddyPounce/src/dialog.cpp9
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
2 files changed, 2 insertions, 9 deletions
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp
index 1e1ef44a5c..e962347e2c 100644
--- a/plugins/BuddyPounce/src/dialog.cpp
+++ b/plugins/BuddyPounce/src/dialog.cpp
@@ -16,7 +16,7 @@ void populateContacts(MCONTACT BPhContact, HWND hwnd2CB)
char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
wchar_t name[300];
- mir_snwprintf(name, L"%s (%s)", Clist_GetContactDisplayName(hContact), _A2T(szProto));
+ mir_snwprintf(name, L"%s (%S)", Clist_GetContactDisplayName(hContact), szProto);
int index = SendMessage(hwnd2CB, CB_ADDSTRING, 0, (LPARAM)name);
SendMessage(hwnd2CB, CB_SETITEMDATA, index, hContact);
if (BPhContact == hContact)
@@ -240,10 +240,6 @@ INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
wi = (windowInfo *)mir_alloc(sizeof(windowInfo));
- if (!wi) {
- msg(TranslateT("error......"), TranslateT("Buddy Pounce"));
- DestroyWindow(hwnd);
- }
wi->hContact = lParam;
wi->SendIfMy = nullptr;
wi->SendWhenThey = nullptr;
@@ -495,9 +491,6 @@ INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
spdps = (SendPounceDlgProcStruct*)lParam;
- if (!spdps)
- DestroyWindow(hwnd);
-
spdps->timer = g_plugin.getWord(spdps->hContact, "ConfirmTimeout");
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)spdps);
{
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 19a9b86bbd..1e83f43d36 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -130,7 +130,7 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
int newStatus = cws->value.wVal;
int oldStatus = db_get_w(hContact, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
- if (newStatus != oldStatus && hContact != NULL && newStatus != ID_STATUS_OFFLINE) {
+ if (newStatus != oldStatus && newStatus != ID_STATUS_OFFLINE) {
DBVARIANT dbv;
if (!g_plugin.getWString(hContact, "PounceMsg", &dbv) && (dbv.pwszVal[0] != '\0')) {
// check my status