Don’t reallocate layout preview window when it is closed/reopened. Pause display link when window is not visible.
Added checks for valid source layout and valid frame before calling render method.