mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +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 {
|
func (i ImageOp) Size() image.Point {
|
||||||
|
if i.src == nil {
|
||||||
|
return image.Point{}
|
||||||
|
}
|
||||||
return i.src.Bounds().Size()
|
return i.src.Bounds().Size()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user