fix a NullReferenceException when the widget is unbound
This commit is contained in:
@@ -379,6 +379,9 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
|
|
||||||
void BindingAddImpl(object item)
|
void BindingAddImpl(object item)
|
||||||
{
|
{
|
||||||
|
if (makeWidget == null)
|
||||||
|
return;
|
||||||
|
|
||||||
var widget = makeWidget(item);
|
var widget = makeWidget(item);
|
||||||
var scrollToBottom = autoScroll && ScrolledToBottom;
|
var scrollToBottom = autoScroll && ScrolledToBottom;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user