Init stock object buffer only once.

svn path=/trunk/; revision=29087
This commit is contained in:
James Tabor
2007-09-17 22:08:14 +00:00
parent 75b11c60f3
commit fec8f2d929
+6 -1
View File
@@ -10,6 +10,7 @@
#include "precomp.h"
extern HGDIOBJ stock_objects[];
BOOL SetStockObjects = FALSE;
/*
* GDI32.DLL doesn't have an entry point. The initialization is done by a call
@@ -70,7 +71,11 @@ GdiDllInitialize (
NtCurrentTeb()->GdiBatchCount = 0;
#endif
// Very simple, the list will fill itself as it is needed.
RtlZeroMemory( &stock_objects, NB_STOCK_OBJECTS); //Assume Ros is dirty.
if(!SetStockObjects)
{
RtlZeroMemory( &stock_objects, NB_STOCK_OBJECTS); //Assume Ros is dirty.
SetStockObjects = TRUE;
}
return TRUE;
}