A temporary measure precipitated by the Allied declaration of war.
Allied declaration of war was on 3 September 1939 and Hitler agreed on giving Stalin 50% of Poland already on 23 August 1939. Something which took place on 3 September could not "precipitate" something which took place earlier - on 23 August of the same year. Unless Nazi Germany had a time machine, of course.
Moreover - a considerable thaw in Soviet-German relations was visible already since the so called "Chestnut speech" of Joseph Stalin on 10 March 1939.
In that speech of 10 March 1939 Stalin expressed a desire to become friendly with Nazi Germany despite ideological and system-wide differences. He accused Western Democracies of inciting to war and of attempting to drag the Soviet Union into future war against Nazi Germany. He also claimed in that speech, that the Anti-Comintern Pact was in fact not signed against the Soviet Union, but against Capitalist States, such as England, France or the USA.
===========================================
I think that even if the German-Polish war did not turn into WW2 on 3 September 1939, the next target of Hitler was still going to be France - not the Soviet Union. Hitler wanted revenge on France for WW1 and the so called "humiliation" of proud Germany by France after WW1.
On the other hand, Hitler did not want a war against GB. Just to say that the Nazis had many sympathizers in Britain, especially amongst the British aristocracy. British Union of Fascists and National Socialists was a completely legal political party in GB until 1940, while for example in Poland (which is considered as having rather friendly relations with Germany after 1933, up to some point of course) Nazi parties were banned and proscribed by the government.
One of British Nazi sympathizers - Unity Mitford - came to Germany and became Hitler's "girlfriend". He surely didn't want to destroy her homeland.
When Britain declared war on Germany on 3 September, Unity tried to commit a suicide (almost succeeded) - but that's another story.