diff options
author | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-11 03:24:35 +0000 |
---|---|---|
committer | andrewfish <andrewfish@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-08-11 03:24:35 +0000 |
commit | 9184d5da2ff27a48f649ad4763021d06e335d1c5 (patch) | |
tree | 3605899788c71ef94dc81e46a8d61617060b64f9 /EmulatorPkg | |
parent | bed0bbc31025aa463d4c5b86f0a02fb4e42a3cc4 (diff) | |
download | edk2-9184d5da2ff27a48f649ad4763021d06e335d1c5.zip edk2-9184d5da2ff27a48f649ad4763021d06e335d1c5.tar.gz edk2-9184d5da2ff27a48f649ad4763021d06e335d1c5.tar.bz2 |
EmulatorPkg: Make the library work with DXE Core.
The DXE core calls library constructors after it calls DEBUG macros, so we need more error handling in the lib.
signed-off-by: andrewfish
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12118 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmulatorPkg')
-rw-r--r-- | EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c b/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c index 8d95921..00d9f19 100644 --- a/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c +++ b/EmulatorPkg/Library/DxeEmuStdErrSerialPortLib/DxeEmuStdErrSerialPortLib.c @@ -66,6 +66,10 @@ SerialPortWrite ( IN UINTN NumberOfBytes
)
{
+ if (gEmuThunk == NULL) {
+ return NumberOfBytes;
+ }
+
return gEmuThunk->WriteStdErr (Buffer, NumberOfBytes);
}
|