mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:38:11 +00:00
LibGfx: Assert that an empty bitmap is not created
This commit is contained in:
parent
cef3988e30
commit
7b6d450b6a
1 changed files with 1 additions and 0 deletions
|
@ -51,6 +51,7 @@ Bitmap::Bitmap(Format format, const Size& size, Purgeable purgeable)
|
|||
, m_format(format)
|
||||
, m_purgeable(purgeable == Purgeable::Yes)
|
||||
{
|
||||
ASSERT(!m_size.is_empty());
|
||||
if (format == Format::Indexed8)
|
||||
m_palette = new RGBA32[256];
|
||||
int map_flags = purgeable == Purgeable::Yes ? (MAP_PURGEABLE | MAP_PRIVATE) : (MAP_ANONYMOUS | MAP_PRIVATE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue