Objects: Fixed runtime error in ringmenu

ERROR: division by zero.
by: Select(381,179) (obj #143) (Objects.ocd\HUD.ocd\Ringmenu.ocd\Script.c:120)
Maikel de Vries 2011-10-11 01:06:36 +02:00
parent 5df61780d4
commit d3007f0bb3
1 changed files with 3 additions and 0 deletions

View File

@ -113,8 +113,11 @@ public func Select(int dx, int dy, bool alt)
{
var item_count=GetLength(menu_icons);
if(!item_count)
{
if(command_object->Selected(this,nil,alt))
Close();
return;
}
var distance = Sqrt(dx*dx+dy*dy);