In the episode Captain Picard is sitting in Ten-Forward when another officer, now an admiral, approaches him. They come to quarrel over an incident in the past, the admiral says something about a court martial being "standard procedure when a ship is lost".
This is TNG: Measure of a Man
PICARD: Oh, you did more than your job. You enjoyed it.
PHILLIPA: Not true! A court martial is standard procedure when a ship is lost. I was doing my duty as an officer of the Judge Advocate General.
For the record, Phillipa Louvois isn't an Admiral but she has been promoted from Lt Cmdr to Captain since he last saw her (when she was prosecuting him for losing the Stargazer)