Yeah, USSR got to keep the part of Poland they invaded. But the treaty between Poland, UK and France only covered aid against a German invasion, so that treaty was honored in the end. In any case, UK and France were not strong enough to beat Germany without help from the USSR.