fix a NullReferenceException when the widget is unbound

This commit is contained in:
Matthias Mailänder
2016-01-03 23:09:04 +01:00
parent 14d412a361
commit fa4a177cd5

View File

@@ -379,6 +379,9 @@ namespace OpenRA.Mods.Common.Widgets
void BindingAddImpl(object item)
{
if (makeWidget == null)
return;
var widget = makeWidget(item);
var scrollToBottom = autoScroll && ScrolledToBottom;