- defaultFontsPerScript = new DefaultFonts();
- *( defaultFontPerScriptCacheBuffer + script ) = defaultFontsPerScript;
+ defaultFontsPerScript = *( defaultFontPerScriptCacheBuffer + script );
+
+ if( NULL == defaultFontsPerScript )
+ {
+ defaultFontsPerScript = new DefaultFonts();
+ *( defaultFontPerScriptCacheBuffer + script ) = defaultFontsPerScript;
+ }