From 8ebec91dbee938be4d41af00460bdfd1e8d1ecbc Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 15 Jun 2014 21:29:38 +0000 Subject: 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 --- src/modules/database/dbutils.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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)) -- cgit v1.2.3