diff --git a/Source/Engine/Render2D/FontTextureAtlas.cpp b/Source/Engine/Render2D/FontTextureAtlas.cpp index 07af69556..ec662c0d4 100644 --- a/Source/Engine/Render2D/FontTextureAtlas.cpp +++ b/Source/Engine/Render2D/FontTextureAtlas.cpp @@ -222,7 +222,7 @@ void FontTextureAtlas::Flush() void FontTextureAtlas::EnsureTextureCreated() const { - if (_texture->IsAllocated() == false) + if (_texture->IsAllocated() == false && GPUDevice::Instance->GetRendererType() != RendererType::Null) { // Initialize atlas texture if (_texture->Init(GPUTextureDescription::New2D(_width, _height, 1, _format, GPUTextureFlags::ShaderResource))) diff --git a/Source/Engine/UI/GUI/RenderOutputControl.cs b/Source/Engine/UI/GUI/RenderOutputControl.cs index 8dc6707bf..9c05e5f98 100644 --- a/Source/Engine/UI/GUI/RenderOutputControl.cs +++ b/Source/Engine/UI/GUI/RenderOutputControl.cs @@ -220,7 +220,9 @@ namespace FlaxEngine.GUI width = _customResolution.Value.X; height = _customResolution.Value.Y; } - if (_backBuffer == null || _backBuffer.Width == width && _backBuffer.Height == height) + if (_backBuffer == null || (_backBuffer.Width == width && _backBuffer.Height == height)) + return; + if (GPUDevice.Instance.RendererType == RendererType.Null) return; if (width < 1 || height < 1) {