mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 13:17:34 +00:00
PixelPaint: Don't allow Image::try_create_from_bitmap(nullptr)
This is not a valid use-case so let's prevent it at compile time.
This commit is contained in:
parent
9038bc675f
commit
92203c9821
2 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ class Image : public RefCounted<Image> {
|
|||
public:
|
||||
static RefPtr<Image> try_create_with_size(Gfx::IntSize const&);
|
||||
static RefPtr<Image> try_create_from_file(String const& file_path);
|
||||
static RefPtr<Image> try_create_from_bitmap(RefPtr<Gfx::Bitmap> bitmap);
|
||||
static RefPtr<Image> try_create_from_bitmap(NonnullRefPtr<Gfx::Bitmap>);
|
||||
|
||||
size_t layer_count() const { return m_layers.size(); }
|
||||
Layer const& layer(size_t index) const { return m_layers.at(index); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue