Skip to content

Commit

Permalink
Merge pull request #795 from hfmrow/Fix-for-#791-gdk.PixBufGetFormats…
Browse files Browse the repository at this point in the history
…-panics

Fix for #791 gdk.PixBufGetFormats() panics
  • Loading branch information
andre-hub committed Jun 26, 2021
2 parents 09574ad + 8f3db17 commit b183dad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gdk/pixbuf_since_2_2.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ func PixbufGetFormats() []*PixbufFormat {

ret := make([]*PixbufFormat, 0, formats.Length())
formats.Foreach(func(item interface{}) {
ret = append(ret, &PixbufFormat{item.(*C.GdkPixbufFormat)})
ret = append(
ret,
&PixbufFormat{
(*C.GdkPixbufFormat)(item.(unsafe.Pointer))})
})

return ret
Expand Down

0 comments on commit b183dad

Please sign in to comment.