summaryrefslogtreecommitdiff
path: root/plugins/WebView/src/webview_services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/WebView/src/webview_services.cpp')
-rw-r--r--plugins/WebView/src/webview_services.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp
index 1992092f8c..274b539352 100644
--- a/plugins/WebView/src/webview_services.cpp
+++ b/plugins/WebView/src/webview_services.cpp
@@ -358,10 +358,9 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
db_unset(hContact, "CList", "NotOnList");
db_unset(hContact, "CList", "Hidden");
}
- db_free(&dbv);
}
+ db_free(&dbv);
}
- db_free(&dbv);
}
if (psr->nick == NULL) {
@@ -404,7 +403,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam)
}
TCHAR *Nend = _tcschr(Newnick, '.');
- *Nend = '\0';
+ if (Nend) *Nend = '\0';
for (HANDLE hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) {
if (!db_get_ts(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {