We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
v -experimental program_using_gg.v
1 parent f001561 commit 92a170aCopy full SHA for 92a170a
vlib/gg/image.v
@@ -55,7 +55,7 @@ const missing_image = Image{}
55
// See also: remove_cached_image_by_idx
56
pub fn (mut ctx Context) get_cached_image_by_idx(image_idx int) &Image {
57
if image_idx < 0 || image_idx > ctx.image_cache.len - 1 {
58
- return &missing_image
+ return unsafe { &missing_image }
59
}
60
return &ctx.image_cache[image_idx]
61
@@ -70,7 +70,7 @@ pub fn (mut ctx Context) remove_cached_image_by_idx(image_idx int) {
70
return
71
72
ctx.image_cache[image_idx].destroy()
73
- ctx.image_cache[image_idx] = &missing_image
+ ctx.image_cache[image_idx] = unsafe { &missing_image }
74
75
76
// Draw part of an image using uv coordinates
0 commit comments