diff options
| author | Steve Bennetts <steve@lindenlab.com> | 2009-11-02 10:55:59 -0800 |
|---|---|---|
| committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-02 10:55:59 -0800 |
| commit | b877665551343dc94ca02c84622b06518f9c23d8 (patch) | |
| tree | 9ad6a76d0363b56ccb249f105d6ee72207df8864 /indra/llrender/llfontregistry.cpp | |
| parent | f732ee6d2e24cd42a06b9cf51c8f6c577f2e476e (diff) | |
| parent | 6e018f7143537af7bd9a08f1cc5c87ea4c8382c8 (diff) | |
merge
Diffstat (limited to 'indra/llrender/llfontregistry.cpp')
| -rw-r--r-- | indra/llrender/llfontregistry.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/indra/llrender/llfontregistry.cpp b/indra/llrender/llfontregistry.cpp index 45573cd817..7a3d6ec4f2 100644 --- a/indra/llrender/llfontregistry.cpp +++ b/indra/llrender/llfontregistry.cpp @@ -380,7 +380,10 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) LLFontDescriptor nearest_exact_desc = *match_desc; nearest_exact_desc.setSize(norm_desc.getSize()); font_reg_map_t::iterator it = mFontMap.find(nearest_exact_desc); - if (it != mFontMap.end()) + // If we fail to find a font in the fonts directory, it->second might be NULL. + // We shouldn't construcnt a font with a NULL mFontFreetype. + // This may not be the best solution, but it at least prevents a crash. + if (it != mFontMap.end() && it->second != NULL) { llinfos << "-- matching font exists: " << nearest_exact_desc.getName() << " size " << nearest_exact_desc.getSize() << " style " << ((S32) nearest_exact_desc.getStyle()) << llendl; |
