Page MenuHomeFeedback Tracker

Gamecrash without error with TextListboxWidget's GetItemData
Closed, ResolvedPublic

Description

I noticed, that trying to the the ItemData of a row, that does not exist (e.g. -1) the game will crash without any error.
I would suggest giving back NULL or even better returning a boolean whether the Method found an entry or not. I don't know if it's the case with GetItemText. This is giving back a boolean.

class TextListboxWidget extends SimpleListboxWidget
{
...
	proto bool GetItemText(int row, int column, out string text);
	proto void GetItemData(int row, int column, out Class data);
...
}

to

class TextListboxWidget extends SimpleListboxWidget
{
...
	proto bool GetItemText(int row, int column, out string text);
	proto bool GetItemData(int row, int column, out Class data);
...
}

Details

Severity
Crash
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
General
Steps To Reproduce
  1. Create a layout with a TextListboxWidget
  2. (optional) add Items to it
  3. Try to get the ItemData of an non existent row like -1
  4. Game will crash

Event Timeline

Geez changed the task status from New to Assigned.Oct 26 2020, 3:54 PM
Geez closed this task as Resolved.Nov 10 2022, 2:47 PM
Geez claimed this task.

Hello LBmaster.
This issue has been fixed internally and the fix will appear in one of the future updates.
Regards,
Geez