Fixed NULL library instance issue
authorjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 14 Apr 2008 03:17:54 +0000 (03:17 +0000)
committerjwang36 <jwang36@7335b38e-4728-0410-8992-fb3ffe349368>
Mon, 14 Apr 2008 03:17:54 +0000 (03:17 +0000)
git-svn-id: https://buildtools.tianocore.org/svn/buildtools/trunk/BaseTools@1146 7335b38e-4728-0410-8992-fb3ffe349368

Source/Python/Workspace/WorkspaceDatabase.py

index fe57571..644c034 100644 (file)
@@ -357,7 +357,8 @@ class DscBuildData(PlatformBuildClassObject):
                 EdkLogger.error('build', FILE_NOT_FOUND, ExtraData=LibraryPath,\r
                                 File=self.DescFilePath, Line=LineNo)\r
             if LibraryClass == '' or LibraryClass == 'NULL':\r
-                LibraryClass = 'NULL%d' % (self._NullLibraryNumber + 1)\r
+                self._NullLibraryNumber += 1\r
+                LibraryClass = 'NULL%d' % self._NullLibraryNumber\r
                 LibraryInstance = self._Db.BuildObject[LibraryPath, MODEL_FILE_INF, self._Arch]\r
                 LibraryInstance.LibraryClass.append(LibraryClassObject(LibraryClass, [ModuleType]))\r
             Module.LibraryClasses[LibraryClass] = LibraryPath\r