[ros-diffs] [tretiakov] 25760: Fix a bug.

tretiakov at svn.reactos.org tretiakov at svn.reactos.org
Sat Feb 10 09:09:04 CET 2007


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/ntuser/kbdlayout.c?rev=25760&r1=25759&r2=25760&view=diff
==============================================================================
--- 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;
    }
    




More information about the Ros-diffs mailing list