Check in a various query functions if the length of the resulting string... #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.