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

Fix null cache crashes. #1002

Open
wants to merge 1 commit into
base: RB-2.6
Choose a base branch
from

Conversation

acolwell
Copy link
Collaborator

@acolwell acolwell commented Oct 2, 2024

Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. Additionally, make sure you've done all of these things:

PR Description

What type of PR is this? (Check one of the boxes below)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Improvement (non-breaking change which does not add functionality nor fixes a bug but improves Natron in some way)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • My change requires a change to the documentation
    • I have updated the documentation accordingly

What does this pull request do?

It fixes a few crashes caused by null cache pointers if an error occurs early in Natron startup. This change simply avoids dereferencing these null pointers so that Natron can exit cleanly without crashing.

Have you tested your changes (if applicable)? If so, how?

Yes. The crashes were easy to reproduce when an error occurs trying to initialize the python bindings or building with NATRON_RUN_WITHOUT_PYTHON. I know these aren't the common build/run situations, but the fix is trivial and it helps avoid early startup errors from being masked by null pointer exceptions. With these changes I've verified that Natron exits cleanly when errors in python initialization occur.

@devernay devernay self-requested a review October 2, 2024 14:19
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.

1 participant