Make sure frame buffer is initialized before drawing
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 50s
Builds / ExectOS (i686) (push) Successful in 49s

This commit is contained in:
Rafal Kupiec 2024-05-18 16:57:38 +02:00
parent d2014a5e82
commit 2103b2dafd
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -28,6 +28,13 @@ HlClearScreen(IN ULONG Color)
ULONG BackgroundColor;
PULONG FrameBuf;
/* Make sure frame buffer is already initialized */
if(HlpFrameBufferData.Initialized == FALSE)
{
/* Unable to operate on non-initialized frame buffer */
return;
}
/* Get pointer to frame buffer */
FrameBuf = HlpFrameBufferData.Address;
@ -198,6 +205,13 @@ HlPutCharacter(IN ULONG PositionX,
PSSFN_FONT_HEADER FbFont;
ULONG FontColor;
/* Make sure frame buffer is already initialized */
if(HlpFrameBufferData.Initialized == FALSE)
{
/* Unable to operate on non-initialized frame buffer */
return;
}
/* Get pointers to font data */
FbFont = (PSSFN_FONT_HEADER)HlpFrameBufferData.Font;
CharacterMapping = (PUCHAR)FbFont + FbFont->CharactersOffset;