Fix crash when using the drag visual tool on a line with a four-argument move tag. Closes #1002.

Originally committed to SVN as r4239.
This commit is contained in:
Thomas Goyne 2010-04-22 01:09:24 +00:00
parent 792c8ec66e
commit de459275a1

View file

@ -544,7 +544,10 @@ void VisualTool::GetLineMove(AssDialogue *diag,bool &hasMove,int &x1,int &y1,int
y1 = tag->Params[1]->AsInt();
x2 = tag->Params[2]->AsInt();
y2 = tag->Params[3]->AsInt();
if (tag->Params.size() >= 6) {
if (tag->Params.size() >= 6 &&
!tag->Params[4]->ommited &&
!tag->Params[5]->ommited) {
t1 = tag->Params[4]->AsInt();
t2 = tag->Params[5]->AsInt();
}