Fix null dereference on error in iOS CameraDevice#1649
Merged
CedricGuillemet merged 2 commits intoBabylonJS:masterfrom Mar 26, 2026
Merged
Fix null dereference on error in iOS CameraDevice#1649CedricGuillemet merged 2 commits intoBabylonJS:masterfrom
CedricGuillemet merged 2 commits intoBabylonJS:masterfrom
Conversation
Guard against nil error variable when creating camera pipeline state error message. If error is nil, append empty string instead of dereferencing nil. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Guards against a nil NSError* being dereferenced when newRenderPipelineStateWithDescriptor:error: fails on iOS, improving robustness of CameraDevice::OpenAsync initialization.
Changes:
- Add a nil-check around
error.localizedDescriptionusage when constructing the pipeline creation failure message.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bkaradzic-microsoft
approved these changes
Mar 26, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
SergioRZMasson
approved these changes
Mar 26, 2026
bghgary
approved these changes
Mar 26, 2026
CedricGuillemet
added a commit
to CedricGuillemet/BabylonReactNative
that referenced
this pull request
Mar 26, 2026
Update BabylonNative commit reference to pick up the fix for null dereference on error in iOS CameraDevice (BabylonJS/BabylonNative#1649). The error variable passed to newRenderPipelineStateWithDescriptor may be nil even when the call fails. The new commit guards against dereferencing nil when building the error message string. Also includes: - MSVC /MP multiprocessor build flag (BabylonJS/BabylonNative#1644) - bgfx update for x86 crash fix (BabylonJS/BabylonNative#1643) - Crash dump collection on all CI platforms (BabylonJS/BabylonNative#1641) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
CedricGuillemet
added a commit
to BabylonJS/BabylonReactNative
that referenced
this pull request
Mar 27, 2026
Update BabylonNative commit reference to pick up the fix for null dereference on error in iOS CameraDevice (BabylonJS/BabylonNative#1649). The error variable passed to newRenderPipelineStateWithDescriptor may be nil even when the call fails. The new commit guards against dereferencing nil when building the error message string. Also includes: - MSVC /MP multiprocessor build flag (BabylonJS/BabylonNative#1644) - bgfx update for x86 crash fix (BabylonJS/BabylonNative#1643) - Crash dump collection on all CI platforms (BabylonJS/BabylonNative#1641) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The error variable passed to RenderPipelineStateWithDescriptor may be nil even when the call fails. This guards against dereferencing nil when building the error message string.