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

ClearField function and nil reference #25

Open
JonLee-Nest opened this issue Mar 4, 2016 · 0 comments
Open

ClearField function and nil reference #25

JonLee-Nest opened this issue Mar 4, 2016 · 0 comments

Comments

@JonLee-Nest
Copy link

Is this usage correct?

pb_instance.ClearField("field_name")

Seems to fail with a nil reference to fields_by_name

        if message_descriptor.fields_by_name[field_name] == nil then
            error('Protocol message has no "' .. field_name .. '" field.')
        end

It looks like the member fields_by_name is never set anywhere, further in the ClearField method there also looks like another potential nil reference as field isn't set either.

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

No branches or pull requests

1 participant