mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 11:25:59 +01:00
guard invalid FB allocs
This commit is contained in:
parent
29626989e7
commit
dd61f88ed1
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue