A U.S. court judge threw out an insider trading case against Dallas Mavericks basketball team owner Mark Cuban on Friday, but gave the U.S. Securities and Exchange Commissions a month to file an amended lawsuit.

Cuban, listed by Forbes magazine as one of the 400 richest Americans, faced civil charges that he acted on nonpublic information when he sold his stake in Internet search engine company Mamma.com to avoid more than $750,000 in losses.

U.S. District Court Judge Sidney Fitzwater gave the SEC 30 days to file an amended complaint, if the SEC can allege that Cuban undertook a duty, expressly or implicitly, not to trade on other otherwise use material, nonpublic information about a public stock offering that Mamma.com had planned.

The SEC filed its civil case in the U.S. District Court for the Northern District of Texas in Dallas. The case number is 3:08-CV-2050-D.

Cuban did not immediately respond to an e-mail seeking comment.