gographics/imagick — pull request #14 by justinfx (2014-04-27 12:11:23+00:00)
Title: Pass a valid new PixelWand pointer instead of a null pointer to avoid crash

The specific GetImagePixelColor call reference in issue #11, along with a few other calls, were passing a null PixelWand pointer to the C call. This fix creates a new valid PixelWand and passes it. The caller would be responsible for destroying it.

Updated test script from original poster:

```
package main

import "github.com/gographics/imagick/imagick"

func main() {

imagick.Initialize()
defer imagick.Terminate()

mw := imagick.NewMagickWand()
defer mw.Destroy()

pw := imagick.NewPixelWand()
defer pw.Destroy()
pw.SetColor("red")

mw.NewImage(50, 50, pw)
pw.SetColor("black")
mw.NewImage(50, 50, pw)
pw.SetColor("blue")
mw.NewImage(50, 50, pw)

mw.ResetIterator()

combine := mw.AppendImages(true)

combine.WriteImage("test.png")

target, _ := combine.GetImagePixelColor(1, 1)
defer target.Destroy()

target, _ = combine.GetImageBackgroundColor()
defer target.Destroy()

target, _ = combine.GetImageBorderColor()
defer target.Destroy()

target, _ = combine.GetImageMatteColor()
defer target.Destroy()

target, _ = combine.GetImageColormapColor(0)
defer target.Destroy()

pw.SetColor("blue")
combine.FloodfillPaintImage(imagick.CHANNELS_DEFAULT, pw, 1, target, 1, 1, false)
combine.WriteImage("test22.png")

}

```