     {
         return ((fontContext != null) && (fontContext is ISystemManager))
                 ? ISystemManager(fontContext)
-                : IUIComponent(parent).systemManager;
+                : (parent is IUIComponent) ? IUIComponent(parent).systemManager : null;
     }
     
     /**

            else
                embeddedFontContext = null;
        }
    }

    /**

                {
                    hostTextLayoutFormat.fontLookup = FontLookup.EMBEDDED_CFF;
                }
                else
                {
                    hostTextLayoutFormat.fontLookup = FontLookup.DEVICE;
                }
            }
        }
        else
