#4380 Preferences : Changing scene font size when geo mech view is open causes crash

Guard access to annotationCollection, as this is nullptr for geo mech views.
This commit is contained in:
Magne Sjaastad
2019-04-30 07:39:24 +02:00
parent fccae4f1cc
commit df62a41397
2 changed files with 18 additions and 11 deletions

View File

@@ -2031,7 +2031,7 @@ void RiaApplication::applyPreferences(const RiaPreferences* oldPreferences)
}
RimGridView* gridView = dynamic_cast<RimGridView*>(rim3dView);
if (gridView)
if (gridView && gridView->annotationCollection())
{
RiaFontCache::FontSize oldFontSize = oldPreferences->defaultAnnotationFontSize();
existingObjectsWithCustomFonts = gridView->annotationCollection()->hasTextAnnotationsWithCustomFontSize(oldFontSize);