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

[Bibtex] Error: Call to a member function getLanguage() on null #190

Open
3 tasks done
hktang opened this issue May 28, 2024 · 0 comments
Open
3 tasks done

[Bibtex] Error: Call to a member function getLanguage() on null #190

hktang opened this issue May 28, 2024 · 0 comments

Comments

@hktang
Copy link

hktang commented May 28, 2024

Please follow the general troubleshooting steps first:

  • I read the README and followed the instructions.
  • I am sure that the used CSL metadata follows the CSL schema.
  • I use a valid CSL stylesheet (bibtex.csl)

Bug reports:

Related to #184 , It seems CiteProc::getContext()->getLocale() is null when using bibtex.csl.

strtok(CiteProc::getContext()->getLocale()->getLanguage(), '-');

Proposal is to supply the default locale "en" if it does not exist, because strtok does not accept null any more.

strtok(CiteProc::getContext()->getLocale()?->getLanguage() ?? "en", '-');
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