Skip to content

#5818 Fix setCursor crash#5832

Open
akleshchev wants to merge 1 commit into
developfrom
andreyk/viewer_5818
Open

#5818 Fix setCursor crash#5832
akleshchev wants to merge 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
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.

BugSplat Report: SecondLifeViewer!LLLineEditor::setCursor(487)

3 participants