         renderEncoder.setFragmentSamplerState(
             samplerState,
             at:MetalConstants.kFragmentSamplerIndex)
-        controller.modelRender?.render(renderEncoder:renderEncoder)
+        controller?.modelRender?.render(renderEncoder:renderEncoder)
         
         renderEncoder.endEncoding()
         commandBuffer.present(drawable)


class VGridVisorMetal:MTKView
{
    private weak var controller:CGridVisor!
    private let samplerState:MTLSamplerState
    private let commandQueue:MTLCommandQueue
    private let pipelineState:MTLRenderPipelineState

    override func draw()
    {
        super.draw()
        controller?.viewGridVisor.viewTarget.update()
        
        guard
            
