From 581f5135ae64519f21b14ae2026fe4f449412f66 Mon Sep 17 00:00:00 2001 From: Alexander Morozov Date: Sun, 4 Mar 2012 18:54:30 +0400 Subject: [PATCH] Check function pointers before using. --- dlls/user32/focus.c | 2 +- dlls/winex11.drv/window.c | 3 ++- programs/explorer/explorer.c | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dlls/user32/focus.c b/dlls/user32/focus.c index a7f0892..dc41a5b 100644 --- a/dlls/user32/focus.c +++ b/dlls/user32/focus.c @@ -138,7 +138,7 @@ static BOOL set_active_window( HWND hwnd, HWND *prev, BOOL mouse, BOOL focus ) * eterbug #1837 in Gnome only */ LOADETER_FUNC(etersoft_getwm) - if (etersoft_getwm() == 2) + if (etersoft_getwm && etersoft_getwm() == 2) { DEFETER_FUNC(etersoft_1version); LOADETER_FUNC(etersoft_1version); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 5f7f412..30d6a36 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -174,7 +174,8 @@ static BOOL etersoft_is_window_managed(HWND hwnd, DWORD style, DWORD ex_style) if (!strcmp(classname, "V8PopupBar") && (style & ~WS_CAPTION) ) return FALSE; LOADETER_FUNC(etersoft_getwm); - if ((etersoft_getwm() == 2) && (!strcmp(classname, "V8NewLocalFrameBaseWnd") || !strcmp(classname, "#32770"))) + if (etersoft_getwm && (etersoft_getwm() == 2) && + (!strcmp(classname, "V8NewLocalFrameBaseWnd") || !strcmp(classname, "#32770"))) return FALSE; } diff --git a/programs/explorer/explorer.c b/programs/explorer/explorer.c index fd79277..ca17669 100644 --- a/programs/explorer/explorer.c +++ b/programs/explorer/explorer.c @@ -752,6 +752,9 @@ BOOL UpdateRegInfo() */ DEFETER_FUNC(etersoft_getlicense); LOADETER_FUNC(etersoft_getlicense); + if (!etersoft_getlicense) + return FALSE; + mbyte = etersoft_getlicense(ETERSOFT_LICENSE_OWNER, 0); orgLen = MultiByteToWideChar(CP_UTF8, 0, mbyte, -1, orgW, 0); orgW = HeapAlloc(GetProcessHeap(), 0, orgLen * sizeof(WCHAR)); -- 1.7.9.2