No, they invaded first, after priorly agreeing to split the country with the Russians. So much for protecting the Poles!
The Germans "invaded" lands that belonged to them before Poland lined up at Versailles to pick at the carcass of Germany at the end of WW1. In addition, the Poles were slaughtering Germans who were living in the re-drawn borders as a result of the dividing up of the booty. I applaud the Germans for righting the wrong and saving German lives. The Poles were infiltrated by Communists, much like all of Europe then.