guard invalid FB allocs

This commit is contained in:
Vaxry 2022-09-18 12:40:49 +01:00
parent 29626989e7
commit dd61f88ed1

View file

@ -3,6 +3,7 @@
bool CFramebuffer::alloc(int w, int h) { bool CFramebuffer::alloc(int w, int h) {
bool firstAlloc = false; 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) { if (m_iFb == (uint32_t)-1) {
firstAlloc = true; firstAlloc = true;