From dd61f88ed15ab81d634652eed66bdd7e18834863 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 18 Sep 2022 12:40:49 +0100 Subject: [PATCH] guard invalid FB allocs --- src/render/Framebuffer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/Framebuffer.cpp b/src/render/Framebuffer.cpp index 90b41a4b..a85b0260 100644 --- a/src/render/Framebuffer.cpp +++ b/src/render/Framebuffer.cpp @@ -3,6 +3,7 @@ bool CFramebuffer::alloc(int w, int h) { bool firstAlloc = false; + RASSERT((w > 1 && h > 1), "cannot alloc a FB with negative / zero size! (attempted %ix%i)", w, h); if (m_iFb == (uint32_t)-1) { firstAlloc = true;