Closed farhaven closed 8 years ago
Thanks, fixed :-)
-Erik
On Wed, Feb 4, 2015 at 10:22 PM, Gregor Best notifications@github.com wrote:
Hi,
the last call to panic in surface.go seems to be misplaced, resulting in a runtime panic everytime cairo.NewSurfaceFromImage is called. This patch fixes the issue:
diff --git a/surface.go b/surface.go index 3409279..9e1d655 100644 --- a/surface.go +++ b/surface.go @@ -724,6 +724,8 @@ func (self *Surface) SetImage(img image.Image) {
case FORMAT_INVALID: panic("Invalid surface format")
+
- default:
- panic("Unknown surface format") }
- panic("Unknown surface format") }
— Reply to this email directly or view it on GitHub https://github.com/ungerik/go-cairo/issues/7.
+43 650 58 33055 erik@erikunger.com Skype: ungerik http://erikunger.com http://github.com/ungerik http://twitter.com/ungerik http://facebook.com/ungerik http://www.linkedin.com/in/ungerik http://www.xing.com/profile/Erik_Unger2
I guess this issue can be closed then? :)
From my side, yeah, of course :)
Hi,
the last call to
panic
insurface.go
seems to be misplaced, resulting in a runtime panic everytimecairo.NewSurfaceFromImage
is called. This patch fixes the issue: