Guard against dead variables container in compact object/instance editors#8484
Merged
Guard against dead variables container in compact object/instance editors#8484
Conversation
NBForgeLab
added a commit
to NBForgeLab/GDevelop
that referenced
this pull request
Apr 5, 2026
* Batch of fixes (4ian#8452) * Profile not loading properly after log in / sign up * Ai requests not loading properly if opened too quickly * 3D Model previews not loading on desktop * Fix the default value displayed for the related function of action with operator (4ian#8453) * Add a callback after the in-game editor stepped (4ian#8457) Only show in developer changelog * Fix JS event API level target (4ian#8459) * improve extensions list mode * updates (#31) * Batch of fixes (4ian#8452) * Profile not loading properly after log in / sign up * Ai requests not loading properly if opened too quickly * 3D Model previews not loading on desktop * Fix the default value displayed for the related function of action with operator (4ian#8453) * Add a callback after the in-game editor stepped (4ian#8457) Only show in developer changelog * Fix JS event API level target (4ian#8459) --------- Co-authored-by: Clément Pasteau <4895034+ClementPasteau@users.noreply.github.com> Co-authored-by: D8H <Davy.Helard@gmail.com> * Show did it work buttons more often for AI output (4ian#8456) Do not show in changelog * [Auto PR] Update translations (4ian#8454) * BehaviorDialog, grid mode view and list mode improvment and new catagory folder * remove unused import * Fix various issues and crashes when reloading/editing resoures in or outside the editor (4ian#8455) * Bump newIDE version * HomePage Menu Collapse * Master official minor improvements (#38) * Make the home page navigation sidebar collapsible * .. * Update HomePageMenuBar.js * Enlarge collapsed home page navigation icons * Remove flagging the game as mobile on every build (4ian#8465) * Trigger unsaved changes when AI works, only when project actually modified (4ian#8464) * Fix asset store pagination when navigating folders and correctly installing visible assets (4ian#8466) * Fix rename context menu item not working anymore on the web-app (4ian#8468) * Fix resources added on Windows using a backslash instead of a slash (not consistent with other platforms) (4ian#8467) * Operators in instructions now automatically defaults to first value (4ian#8471) * 000 (#40) * Make the home page navigation sidebar collapsible * Remove flagging the game as mobile on every build (4ian#8465) * Trigger unsaved changes when AI works, only when project actually modified (4ian#8464) * Fix asset store pagination when navigating folders and correctly installing visible assets (4ian#8466) * Fix rename context menu item not working anymore on the web-app (4ian#8468) * Fix resources added on Windows using a backslash instead of a slash (not consistent with other platforms) (4ian#8467) * Operators in instructions now automatically defaults to first value (4ian#8471) --------- Co-authored-by: Clément Pasteau <4895034+ClementPasteau@users.noreply.github.com> * Fix tentatively crashes at scene editor resize * Fix a crash when deleting a function folder while one of its function was selected (4ian#8475) * Fix Spine objects not properly loading in the editor anymore (4ian#8476) - Also fix hot reloading of Spine objects in preview and the 3D editor * Bump newIDE version * Fix potential UseAfterFreeError on VariablesContainer.serializeTo * Introduce a direct link to open the create dialog (4ian#8460) Don't show in changelog * Allow extensions to set different icons for behaviors and objects (4ian#8472) * Ensure JSON files end with a new line (4ian#8469) Only show in developer changelog * Fix some fields of the extension properties (4ian#8480) * Bring forward the preview window on the web-app when hot-reloading (4ian#8478) * Reduce extension search dialog to three columns * Upgrade react-dnd to v14 and simplify drag-and-drop setup (4ian#8479) Only show in developer changelog * Fix potential use-after-free in instance properties when deleting scene instances (4ian#8481) * Fix potential crash in instance properties (4ian#8483) * Fix potential crash in the object properties (4ian#8484) * Fix more potential crashes (4ian#8485) * Bump newIDE version * Add null safety checks for aiRequest.output property (4ian#8486) Only show in developer changelog --------- Co-authored-by: Clément Pasteau <4895034+ClementPasteau@users.noreply.github.com> Co-authored-by: D8H <Davy.Helard@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Florian Rival <Florian.rival@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: LuniMoon <103995399+LuniMoon@users.noreply.github.com> Co-authored-by: opaldi <2235599+opaldi@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.
Motivation
object.getVariables()orinstance.getVariables().Description
exceptionallyGuardAgainstDeadObjectfrom../../Utils/IsNullPtrand use it to sanitizeobject.getVariables()andinstance.getVariables()intovariablesContainerbefore use.variablesContainerinstead of direct calls togetVariables()when renderingVariablesListand when handling the object variablesTopLevelCollapsibleSectionto conditionally render that section only when the container is valid.Testing
yarn test, and all tests passed.yarn lint, and no linting errors were reported.yarn build, which completed successfully.Codex Task