(Reuters) - Southwest Airlines Co won the dismissal of a proposed class-action lawsuit seeking damages for stranded passengers on hundreds of winter flights it was forced to cancel because it ran out of de-icer fluid.

FILE PHOTO: A traveler checks her baggage at the Southwest Airlines terminal at LAX airport in Los Angeles, California, U.S., January 24, 2017. REUTERS/Lucy Nicholson/File Photo

U.S. District Judge Sara Ellis in Chicago ruled on Tuesday that Southwest’s ticketing terms did not imply that the Dallas-based carrier had a legal duty to always stock enough fluid.

She also said the terms explicitly excused Southwest from liability, because passenger safety could be jeopardized if planes that had not been de-iced took off in winter weather.

“Running out of de-icer implicates aviation safety, regardless of whether it was a foreseeable event,” Ellis wrote.

A lawyer for the plaintiff Brian Hughes, an Illinois resident, had no immediate comment on Wednesday. Southwest and its lawyers did not immediately respond to requests for comment.

Hughes sued on behalf of Southwest passengers who incurred hotel, food and other costs because of flight cancellations at Chicago’s Midway Airport on six days from Dec. 8, 2017 to Feb. 11, 2018.

He said Southwest canceled 250 flights to and from Midway on Feb. 11, including his scheduled flight from Phoenix, because it ran out of de-icer fluid, which no other carrier had done.

Hughes said was forced to fly instead to Omaha, Nebraska and stay overnight, returning to Chicago on Feb. 12.

In seeking a dismissal, Southwest said it could not control the weather, and its passenger contracts allowed it to cancel flights because of bad weather “when necessary or advisable.”

The case is Hughes v Southwest Airlines Co, U.S. District Court, Northern District of Illinois, No. 18-5315.