summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-06-15 21:29:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-06-15 21:29:38 +0000
commit8ebec91dbee938be4d41af00460bdfd1e8d1ecbc (patch)
tree5632797274f63b3e8820a3d1439e5a00dc313a9a
parent9332822326de9752e436a867a08a438f6efa2a07 (diff)
no need to crash on getting broken event text
git-svn-id: http://svn.miranda-ng.org/main/trunk@9515 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--src/modules/database/dbutils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp
index 7dacd223cd..e71d265bbe 100644
--- a/src/modules/database/dbutils.cpp
+++ b/src/modules/database/dbutils.cpp
@@ -97,6 +97,8 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam)
return 0;
DBEVENTINFO *dbei = egt->dbei;
+ if (dbei == NULL || dbei->szModule == NULL || dbei->cbSize != sizeof(DBEVENTINFO))
+ return 0;
DBEVENTTYPEDESCR *et = (DBEVENTTYPEDESCR*)DbEventTypeGet((WPARAM)dbei->szModule, (LPARAM)dbei->eventType);
if (et && ServiceExists(et->textService))