From f36e90f9c1ff50a72dee31618aa4c557ade6378f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Wed, 23 Jul 2003 20:39:45 +0000 Subject: [PATCH] Handle non-existing accelerator table svn path=/trunk/; revision=5233 --- reactos/lib/user32/windows/accel.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/reactos/lib/user32/windows/accel.c b/reactos/lib/user32/windows/accel.c index 6ae6f157037..1b03f7af5b0 100644 --- a/reactos/lib/user32/windows/accel.c +++ b/reactos/lib/user32/windows/accel.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: accel.c,v 1.10 2003/07/20 03:45:31 hyperion Exp $ +/* $Id: accel.c,v 1.11 2003/07/23 20:39:45 gvg Exp $ * * PROJECT: ReactOS user32.dll * FILE: lib/user32/windows/input.c @@ -238,11 +238,15 @@ HACCEL WINAPI LoadAcceleratorsW(HINSTANCE hInstance, LPCWSTR lpTableName) */ HACCEL WINAPI LoadAcceleratorsA(HINSTANCE hInstance, LPCSTR lpTableName) { - return U32LoadAccelerators - ( - hInstance, - FindResourceExA(hInstance, MAKEINTRESOURCEA(RT_ACCELERATOR), lpTableName, 0) - ); + HRSRC Accel; + + Accel = FindResourceExA(hInstance, MAKEINTRESOURCEA(RT_ACCELERATOR), lpTableName, 0); + if (NULL == Accel) + { + return NULL; + } + + return U32LoadAccelerators(hInstance, Accel); } /*