Yaakov's family wasn't subject to the famine. He had plenty of money and was in the process of purchasing grain, which was for sale to the public, from Egypt when Joseph revealed himself. Perhaps if he had no more money or grain was no longer for sale it would have been forbidden. Furthermore, there are commentators who posit that Yaakov miraculously had plenty of food and only sent the brothers to purchase food so neighbors won't be covetous of him.