🐛 fixes "too many items" when names are null (#543)
* 🐛 avert infinite loop when prod_id not assigned Without ptr being reassigned in the case of a 0 prod_id, the app would get into an infinite loop on launch, before opening- this should resolve it 😊 * 🐛 fixes "too many items" when names are null There is an (honestly misleading) OutOfMemoryException with the message "too many items in listbox" that is thrown when there are any items whose ToString() method returns null. This commit (in my maybe-biased opinion) gives a reasonable output in that case instead.
This commit is contained in:
parent
aec0e1d2a8
commit
06edcb1be5
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ namespace BetterJoyForCemu {
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string ToString() {
|
public override string ToString() {
|
||||||
return name;
|
return name ?? $"Unidentified Device ({this.product_id})";
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Serialise() {
|
public string Serialise() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue