forked from joejulian/gio
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