fixed cache bug
This commit is contained in:
parent
1699257f6d
commit
3fcf95cc86
2 changed files with 3 additions and 4 deletions
|
@ -460,9 +460,8 @@ func (cv *Canvas) SetFont(font interface{}, size float64) {
|
|||
} else {
|
||||
f, err := LoadFont(v)
|
||||
if err == nil {
|
||||
cv.state.font = f
|
||||
} else {
|
||||
fonts[v] = f
|
||||
cv.state.font = f
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,8 +79,8 @@ func getImage(image interface{}) *Image {
|
|||
return img
|
||||
}
|
||||
img, err := LoadImage(v)
|
||||
if err == nil {
|
||||
return img
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
images[v] = img
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue