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

Added null pointer check for asQuickItem() #520

Merged
merged 2 commits into from
Aug 18, 2023
Merged

Conversation

ksuprynowicz
Copy link
Member

This fixes random crashes when closing script log window.

@ksuprynowicz ksuprynowicz added needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested labels Jul 17, 2023
Copy link
Contributor

@daleglass daleglass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a bit inefficient? You're calling asQuickItem() twice now,.

Also, I think such code tends to look suspicious, because what if it returns different things on successive calls? Now the person reading the code has to look at the implementation to make sure that can't happen.

@ksuprynowicz ksuprynowicz added CR approved This pull request has been successfully code reviewed and removed needs CR This pull request needs to be code reviewed needs QA This pull request needs to be tested labels Aug 18, 2023
@ksuprynowicz ksuprynowicz merged commit 9c78c8f into master Aug 18, 2023
2 of 5 checks passed
@ksuprynowicz ksuprynowicz deleted the fix/script_crash branch August 18, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CR approved This pull request has been successfully code reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants