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

Check in a various query functions if the length of the resulting string... #40

Closed
wants to merge 2 commits into from

Conversation

woudshoo
Copy link
Contributor

When I call get-shader-info-log when no error or warning was created compiling the shader, I get a segfault with CCL on MacOSX. I did not really track it down, but I assume that the allocation of a zero length array returns something unsuitable, or that the OpenGL library on OSX does not handle it gracefully.

I have modified the get-shader-info-log function (and 2 other functions nearby that also return strings.) to check if the length is > 0 . If the length of the string is 0 the function will now return nil.

I am not sure if returning nil or "" is better. However for me at the moment it seem easier to discard a log entry when it return 'nil' instead of checking on the "" (empty string).

Kind regards,
Wim Oudshoorn.

@3b
Copy link
Owner

3b commented Feb 4, 2015

fixed (though returning "" instead of NIL to match previous behavior on platforms where it worked), sorry for the slow response.

@3b 3b closed this Feb 4, 2015
@woudshoo
Copy link
Contributor Author

woudshoo commented Feb 6, 2015

Thank you for merging both fixes.

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

Successfully merging this pull request may close these issues.

2 participants