
513 F.3d 781 (2008)
Regina SMITH, Plaintiff-Appellant,
v.
John E. POTTER, Postmaster General, Defendant-Appellee.
No. 07-1530.
United States Court of Appeals, Seventh Circuit.
Argued December 11, 2007.
Decided January 29, 2008.
*782 Stuart K. Jones (argued), Chicago, IL, for Plaintiff-Appellant.
Donald R. Lorenzen (argued), Office of the United States Attorney, Chicago, IL, for Defendant-Appellee.
Before POSNER, WOOD, and EVANS, Circuit Judges.
POSNER, Circuit Judge.
The plaintiff sued the postal service in December 2004 charging sex discrimination in the form of sexual harassment, in violation of Title VII. The complaint alleged that coworkers made sexually offensive comments to her and also touched her in sexually offensive ways and that management refused despite her complaints to act against the harassment. She asked for damages and an injunction. The defendant did not file an answer, but instead moved to dismiss the suit on the basis of improper service. Before the judge could decide the motion, the plaintiff filed a notice of (captioned however as a motion for) voluntary dismissal. Fed.R.Civ.P. 41(a)(1). The district judge responded by dismissing the suit with prejudice. One month later, the plaintiff filed another, quite similar suit, but it sought only damages and while repeating the allegations in the first complaint added, allegations of similar misconduct committed after the filing of that suit. The district judge dismissed the second suit as barred by res judicata.
Rule 41(a)(1) provides that if the plaintiff "files a notice of dismissal before the opposing party serves either an answer or a motion for summary judgment . . . the dismissal is without prejudice." The plaintiff sought to dismiss her first suit before the defendant filed either an answer or a motion for summary judgment, so the judge was not authorized to dismiss the suit with prejudice. The miscaptioned motion itself effected the dismissal of the suit; the case was gone; no action remained for the district judge to take. Since there was no longer a case pending before him, and *783 since a federal judge's authority to issue orders depends (with immaterial exceptions) on the existence of a case, his order was void. Marques v. Federal Reserve Bank of Chicago, 286 F.3d 1014, 1018 (7th Cir.2002); Bryan v. Smith, 174 F.2d 212, 214 (7th Cir.1949); Commercial Space Mgmt. Co. v. Boeing Co., 193 F.3d 1074, 1077 n. 4 (9th Cir.1999); see also Beck v. Caterpillar, Inc., 50 F.3d 405, 407 (7th Cir.1995); Foss v. Federal Intermediate Credit Bank, 808 F.2d 657, 660 (8th Cir. 1986). And, being void, it can have no effect "in the present suit, even though neither party noticed the error; "void judgments are legal nullities." United States v. Indoor Cultivation Equipment, 55 F.3d 1311 (7th Cir.1995); United States v. Martin, 378 F.3d 353, 358 (4th Cir.2004). "It is as if the suit had never been brought." Bryan v. Smith, supra, 174 F.2d at 214. The dismissal of the first suit was without prejudice, and such a dismissal does not have res judicata effect.
In fairness to the judge, the plaintiffs lawyer had captioned the Rule 41(a)(1) notice of dismissal "motion to voluntarily dismiss the plaintiff's complaint." The motion explained, however, that the plaintiff "no longer wishes to proceed with the complaint," and in an affidavit attached to the motion she said "I wish to dismiss the above stated [i.e., this] case." In substance, then, this was a Rule 41(a)(1) motion, as courts in similar cases have held. E.g., Williams v. Ezell, 531 F.2d 1261, 1263 (5th Cir.1976); Roddy v. Dendy, 141 F.R.D. 261 (S.D.Miss.1992). The judge's statement that the plaintiff had moved "to voluntarily dismiss the complaint with prejudice" is incorrect; there is no reference to dismissal with prejudice either in the motion or in the affidavit attached to it.
Even if the dismissal had been with prejudice, the district court would have been mistaken to dismiss the second suit on the ground of res judicata. Res judicata does not bar a suit based on claims that accrue after a previous suit was filed. Doe v. Allied-Signal, Inc., 985 F.2d 908, 914 (7th Cir.1993); Spiegel v. Continental Illinois National Bank, 790 F.2d 638, 646 (7th Cir.1986); Rawe v. Liberty Mutual Fire Ins. Co., 462 F.3d 521, 530 (6th Cir.2006); Computer Associates Int'l, Inc. v. Altai, Inc., 126 F.3d 365, 369-70 (2d Cir.1997); Manning v. City of Auburn, 953 F.2d 1355, 1360 (11th Cir.1992). It does not matter whether, as in the case of harassment, the unlawful conduct is a practice, repetitive by nature, see National Railroad Passenger Corp. v. Morgan, 536 U.S. 101, 117-19, 122 S.Ct. 2061, 153 L.Ed.2d 106 (2002), that happens to continue after the first suit is filed, or whether it is an act, causing discrete, calculable harm, that happens to be repeated. The filing of a suit does not entitle the defendant to continue or repeat the unlawful conduct with immunity from further suit. Lawlor v. National. Screen Service Corp., 349 U.S. 322, 328, 75 S.Ct. 865, 99 L.Ed. 1122 (1955).
It is true that some of the alleged harassment that occurred after the plaintiff filed her first suit occurred before she dismissed the suit, and so, the government argues, she could have amended her complaint to add an allegation of that harassment. But as the Doe and Rawe decisions cited above hold, there is no legal duty to amend rather than bring a fresh suit, especially since a plaintiff has a right to amend her complaint only once without leave of court. Fed.R.Civ.P. 15(a). Suppose that a year into the case, with trial about to begin, the plaintiff experienced a fresh act of harassment. The judge might quite understandably not want to allow her to amend her complaint to add the new allegation, because that might require additional discovery and so force postponement of the trial. On the government's view, *784 the judge would have to either allow the amendment, in order to prevent the bar of res judicata from cutting off the plaintiff's access to a remedy for the fresh harassment, or deny it and by doing so deny her any remedy. Neither alternative is attractive.
Nor is the government right to argue that the plaintiffs second suit should be barred because she sought injunctive relief in her first suit and had it been granted the additional misconduct alleged in the second suit would have been prevented. Suppose the plaintiff sues on day 1, on day 2 exercises her right to dismiss the suit without prejudice, and on day 3 is subjected to additional harassment. The government's position appears to be that having sought injunctive relief in the first suit, she could obtain no remedy against the new harassment, although she could obtain a remedy against the old harassment by filing a new suit. That makes no sense.
REVERSED AND REMANDED.
