Author: tretiakov Date: Sat Feb 10 11:09:04 2007 New Revision: 25760
URL: http://svn.reactos.org/svn/reactos?rev=25760&view=rev Log: Fix a bug.
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ntu... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/kbdlayout.c Sat Feb 10 11:09:04 2007 @@ -158,34 +158,35 @@
*phModule = EngLoadImage(FullLayoutPath.Buffer);
- if(!*phModule) - { - DPRINT1( "Failed to load %wZ\n", &FullLayoutPath ); - } - else - { - DPRINT( "Loaded Keyboard Layout: %wZ\n", &FullLayoutPath ); - } - - RtlInitAnsiString( &kbdProcedureName, "KbdLayerDescriptor" ); - LdrGetProcedureAddress((PVOID)*phModule, - &kbdProcedureName, - 0, - (PVOID*)&layerDescGetFn); - - if(layerDescGetFn) - { - *pKbdTables = layerDescGetFn(); + if(*phModule) + { + DPRINT("Loaded %wZ\n", &FullLayoutPath); + + RtlInitAnsiString( &kbdProcedureName, "KbdLayerDescriptor" ); + LdrGetProcedureAddress((PVOID)*phModule, + &kbdProcedureName, + 0, + (PVOID*)&layerDescGetFn); + + if(layerDescGetFn) + { + *pKbdTables = layerDescGetFn(); + } + else + { + DPRINT1("Error: %wZ has no KbdLayerDescriptor()\n", &FullLayoutPath); + } + + if(!layerDescGetFn || !*pKbdTables) + { + DPRINT1("Failed to load the keyboard layout.\n"); + EngUnloadImage(*phModule); + return FALSE; + } } else { - DPRINT1("Error: %wZ has no KbdLayerDescriptor()\n", &FullLayoutPath); - } - - if(!layerDescGetFn || !*pKbdTables) - { - DPRINT1("Failed to load the keyboard layout.\n"); - EngUnloadImage(*phModule); + DPRINT1("Failed to load dll %wZ\n", &FullLayoutPath); return FALSE; }