Add a bit of defensive programming
authorGé van Geldorp <ge@gse.nl>
Wed, 16 Nov 2005 21:44:26 +0000 (21:44 +0000)
committerGé van Geldorp <ge@gse.nl>
Wed, 16 Nov 2005 21:44:26 +0000 (21:44 +0000)
svn path=/trunk/; revision=19283

reactos/services/dhcp/adapter.c

index 58c5da3..f6ee86b 100644 (file)
@@ -125,6 +125,7 @@ HKEY FindAdapterKey( PDHCP_ADAPTER Adapter ) {
             ( EnumKey, EnumKeysTop[i], "DriverDesc" );
 
         if( DriverDesc &&
             ( EnumKey, EnumKeysTop[i], "DriverDesc" );
 
         if( DriverDesc &&
+            RootDevice &&
             !strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) {
             TargetKeyName =
                 malloc( strlen( TargetKeyNameStart ) +
             !strcmp( DriverDesc, Adapter->DhclientInfo.name ) ) {
             TargetKeyName =
                 malloc( strlen( TargetKeyNameStart ) +