mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-02 16:06:19 +00:00
op/paint: guard against nil image in ImageOp.Size
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -67,6 +67,9 @@ func NewImageOp(src image.Image) ImageOp {
|
||||
}
|
||||
|
||||
func (i ImageOp) Size() image.Point {
|
||||
if i.src == nil {
|
||||
return image.Point{}
|
||||
}
|
||||
return i.src.Bounds().Size()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user