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

issue: fix nil pointer dereference on plumb error #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jroimartin
Copy link

@jroimartin jroimartin commented Jan 11, 2020

plumbserve() fails with a nil pointer dereference when it tries to
print errors via w.Err(). This happens because w is a dummy window
with a nil *acme.Win. This commit replaces w.Err() calls in
plumbserve() with acme.Errf(). It also extracts the plumbserve()
method out of *awin, given that the previous change removes this
dependency.

This PR also documents "githubissue" plumb port requirement and how to create
it under the section "Acme Editor Integration".

Fixes issue #5.

plumbserve() fails with a nil pointer dereference when it tries to
print errors via w.Err(). This happens because w is a dummy window
with a nil *acme.Win. This commit  replaces w.Err() calls in
plumbserve() with acme.Errf(). It also extracts the plumbserve()
method out of *awin, given that the previous change removes this
dependency.

Fixes issue rsc#5.
Document "githubissue" plumb port requirement and how to create
it under the section "Acme Editor Integration".
@jroimartin
Copy link
Author

The initial version of the PR was using log.Printf() to output plumb errors. I've updated it to use acme.Errf() instead.

@ollytom
Copy link

ollytom commented Jul 5, 2022

Got halfway implementing this same patch then found this one. Thanks @jroimartin :)

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