Author: jimtabor
Date: Tue Sep 18 02:08:14 2007
New Revision: 29087
URL:
http://svn.reactos.org/svn/reactos?rev=29087&view=rev
Log:
Init stock object buffer only once.
Modified:
trunk/reactos/dll/win32/gdi32/main/dllmain.c
Modified: trunk/reactos/dll/win32/gdi32/main/dllmain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/main/dllma…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/main/dllmain.c (original)
+++ trunk/reactos/dll/win32/gdi32/main/dllmain.c Tue Sep 18 02:08:14 2007
@@ -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 @@
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;
}