Page MenuHomeFeedback Tracker

SCR_SliderComponent::HandlerDeattached() not checking for valid m_Handler
Assigned, NormalPublic

Description

While trying to figure out how to make a SliderWidget work, I discovered that adding an SCR_SliderComponent without there being a valid SCR_EventHandlerComponent in an expected path, will cause the Workbench to throw this error:

SCRIPT    (E): Virtual Machine Exception

Reason: NULL pointer to instance

Class:      'SCR_SliderComponent'
Function: 'HandlerDeattached'
Stack trace:
Scripts/Game/UI/Components/WidgetLibrary/SCR_Slider/SCR_SliderComponent.c:71 Function HandlerDeattached

Suggested fix: Add an early-exit check to SCR_SliderComponent::HandlerDeattached() if m_Handler is NULL

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General
Steps To Reproduce
  1. Create a new layout
  2. Add a FrameWidget "Frame0"
  3. Add a SliderWidget "Slider" as a child of "Frame0" <-- Important, the slider widget must be named "Slider"
  4. Add a SCR_SliderComponent to "Frame0"
  5. Save the layout
  6. Examine the error shown

Event Timeline

Geez changed the task status from New to Assigned.Mon, Jun 17, 12:30 PM