Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transform.SetQuat can panic #141

Closed
azul3d-bot opened this issue Mar 6, 2016 · 2 comments
Closed

transform.SetQuat can panic #141

azul3d-bot opened this issue Mar 6, 2016 · 2 comments

Comments

@azul3d-bot
Copy link

Issue by jteeuwen
Tuesday Jan 13, 2015 at 12:04 GMT
Originally opened as azul3d-legacy/gfx#90


Transform.SeQuatis missing a nil check before the pointer dereference and can panic as a result:

https://github.com/azul3d/gfx/blob/v2-dev/transform.go#L231:

func (t *Transform) SetQuat(q lmath.Quat) {
    t.access.Lock()
    if (*t.quat) != q {
        t.built = nil
        t.quat = &q
    }
    t.access.Unlock()
}
@azul3d-bot
Copy link
Author

Comment by slimsag
Wednesday Jan 14, 2015 at 07:12 GMT


Thank you for the detailed issue report.

I've fixed the issue at hand and added a test to ensure this method works.

@azul3d-bot
Copy link
Author

Fixed/merged as part of #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant