Fix buy/sell of stackable items on 8.6

This commit is contained in:
Eduardo Bart
2013-01-17 16:09:51 -02:00
parent b68df8336a
commit ada2c9efe9
5 changed files with 9 additions and 8 deletions

View File

@@ -115,8 +115,10 @@ function UIMiniWindowContainer:swapInsert(widget, index)
if oldParent == self and oldIndex ~= index then
local oldWidget = self:getChildByIndex(index)
self:removeChild(oldWidget)
self:insertChild(oldIndex, oldWidget)
if oldWidget then
self:removeChild(oldWidget)
self:insertChild(oldIndex, oldWidget)
end
self:removeChild(widget)
self:insertChild(index, widget)
end