From 77d9ca1d86b619f4a80b69ced3e5ef963a22d997 Mon Sep 17 00:00:00 2001 From: Astazium <113135541+Astazium@users.noreply.github.com> Date: Mon, 1 Jun 2026 21:18:33 +0300 Subject: [PATCH] fix --- src/graphics/core/GBuffer.cpp | 4 ++-- src/logic/scripting/lua/libs/libentity.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/graphics/core/GBuffer.cpp b/src/graphics/core/GBuffer.cpp index 30c3e66c7..85a223ca5 100644 --- a/src/graphics/core/GBuffer.cpp +++ b/src/graphics/core/GBuffer.cpp @@ -54,8 +54,8 @@ GBuffer::GBuffer(uint width, uint height) positionsBuffer {0, GL_RGBA16F, GL_RGBA, GL_FLOAT, GL_COLOR_ATTACHMENT1}, normalsBuffer {0, GL_RGBA16F, GL_RGB, GL_FLOAT, GL_COLOR_ATTACHMENT2}, emissionBuffer {0, GL_R8, GL_RED, GL_FLOAT, GL_COLOR_ATTACHMENT3}, - ssaoBuffer {0, GL_R16F, GL_RED, GL_FLOAT, 0}, - depthBuffer {0, 0, 0, 0, 0} + depthBuffer {0, 0, 0, 0, 0}, + ssaoBuffer {0, GL_R16F, GL_RED, GL_FLOAT, 0} { glGenFramebuffers(1, &fbo); glBindFramebuffer(GL_FRAMEBUFFER, fbo); diff --git a/src/logic/scripting/lua/libs/libentity.cpp b/src/logic/scripting/lua/libs/libentity.cpp index d2c0c4bc5..48b05228d 100644 --- a/src/logic/scripting/lua/libs/libentity.cpp +++ b/src/logic/scripting/lua/libs/libentity.cpp @@ -62,6 +62,9 @@ static int l_get_def(lua::State* L) { static int l_spawn(lua::State* L) { auto level = controller->getLevel(); auto defname = lua::tostring(L, 1); + if (defname == nullptr) { + throw std::runtime_error("empty string"); + } auto& def = content->entities.require(defname); auto pos = lua::tovec3(L, 2); dv::value args = nullptr;