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 misplaced nullptr checks after creating textures in W3DProjectedShadowManager #1103

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

xezon
Copy link
Contributor

@xezon xezon commented Feb 10, 2024

This change fixes misplaced tests in various functions of W3DProjectedShadowManager class.

Originally, the allocated textures would be accessed first, and then tested against null.

It needs to be the other way around, otherwise this would crash.

Additionally this change fixes some mistakes in relevant shadow assert messages.

@codecov-commenter
Copy link

codecov-commenter commented Feb 10, 2024

Codecov Report

Attention: 17 lines in your changes are missing coverage. Please review.

Comparison is base (cfa005f) 2.53% compared to head (31b198c) 2.53%.

Files Patch % Lines
...orm/w3dengine/client/shadow/w3dprojectedshadow.cpp 0.00% 15 Missing ⚠️
...tform/w3dengine/client/shadow/w3dbuffermanager.cpp 0.00% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1103   +/-   ##
========================================
  Coverage     2.53%    2.53%           
========================================
  Files          949      949           
  Lines       110299   110299           
  Branches     18881    18881           
========================================
  Hits          2800     2800           
  Misses      107095   107095           
  Partials       404      404           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants