Skip to content

#5818 Fix setCursor crash#5832

Merged
akleshchev merged 1 commit into
developfrom
andreyk/viewer_5818
May 19, 2026
Merged

#5818 Fix setCursor crash#5832
akleshchev merged 1 commit into
developfrom
andreyk/viewer_5818

Conversation

@akleshchev
Copy link
Copy Markdown
Contributor

reshape() tried to setCursor(0) before postBuild()

reshape tried to setCursor before postBuild
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes a crash in the profile pick panel caused by reshape() attempting to call setCursor() on an uninitialized LLLineEditor* before postBuild() assigns child pointers.

Changes:

  • Initialize LLPanelProfilePick child-control pointers to nullptr in the header to avoid indeterminate values prior to postBuild().
  • Guard mPickLocation->setCursor(0) in LLPanelProfilePick::reshape() to avoid dereferencing a null pointer when reshape() runs early.
  • Minor cleanup in LLLineEditor::setCursor() to reuse the LLWString reference instead of calling getWString() repeatedly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
indra/newview/llpanelprofilepicks.h Default-initialize UI child pointers to nullptr so early lifecycle calls don’t see garbage values.
indra/newview/llpanelprofilepicks.cpp Add a null check in reshape() before using mPickLocation, preventing the reported crash.
indra/llui/lllineeditor.cpp Reduce repeated getWString() calls by caching a const LLWString& during cursor/scroll calculations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@akleshchev akleshchev linked an issue May 18, 2026 that may be closed by this pull request
@akleshchev akleshchev merged commit df84417 into develop May 19, 2026
16 checks passed
@akleshchev akleshchev deleted the andreyk/viewer_5818 branch May 19, 2026 00:51
@github-actions github-actions Bot locked and limited conversation to collaborators May 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

3 participants