Fix warnings when running on null renderer

This commit is contained in:
2026-08-26 13:22:10 +02:00
parent b58d863ed4
commit b7919fc3dd
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -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)))
+3 -1
View File
@@ -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)
{