Hmm, that red line ends at an unexpected place. First Delphi IDE has a habit underlining the wrong line of code. Watch out!
Second it's only the IDE, so if it runs, then it's correct, and you may just have to restart the IDE. :D
Of course, red line means bad (syntax error in Delphi 2k5), but always doublecheck with the compiler if it seems to have no point!