rgbkrk / libvirt-go

[DEPRECATED] Go bindings for libvirt
https://github.com/libvirt/libvirt-go
MIT License
166 stars 50 forks source link

errors: don't make GetLastError() segfault when on no error condition #103

Closed vincentbernat closed 8 years ago

vincentbernat commented 8 years ago

When calling GetLastError() twice in a row, we get a segfault because virGetLastError() C function returns nil. We cannot return nil since we don't return a pointer, but we can return a special error that means "no error".

rgbkrk commented 8 years ago

Rebase this and let's merge it.

vincentbernat commented 8 years ago

Rebased too.