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

[Bug] Incorrect usage of '!.', instead of '?.', on nullable values causes runtime errors on Android. #360

Open
1 task done
sycghj opened this issue Dec 13, 2024 · 0 comments

Comments

@sycghj
Copy link

sycghj commented Dec 13, 2024

Check the following items

  • I have looked up relevant Issue

Description of the issue

In SuikiUI.Utilities.Effects.SukiEffect.cs at line 72, the !. operator is used to suppress nullability warnings. However, this usage might cause a runtime error (which has already occurred on my Android device). Can we replace the !. operator with ?. instead? Since there is an if block after line 72 to handle cases where assembly is null, using ?. would be safer and more consistent.

Alternatively, do I need to submit a formal request to fix this bug?

Snipaste_2024-12-11_10-36-13

Package Version

the latest version of the main branch

Environment

Android 15

Expected Behavior

The app throws a runtime exception: NullReferenceException.

Reproduction

Maybe just used SuikiUI on an Android device? I'm not sure, because my project does not use Suki:Window

Additional Information

No response

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