LibGfx: Assert that an empty bitmap is not created
This commit is contained in:
parent
cef3988e30
commit
7b6d450b6a
Notes:
sideshowbarker
2024-07-19 09:26:59 +09:00
Author: https://github.com/shannonbooth Commit: https://github.com/SerenityOS/serenity/commit/7b6d450b6af Pull-request: https://github.com/SerenityOS/serenity/pull/1209 Reviewed-by: https://github.com/awesomekling
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
Reference in a new issue