In a world where the geostrategic situation can be largely broken down into "the west vs. the rest", Russia is basically China's only ally (in the sense that "the enemy of my enemy is my friend") of any consequence. While it's likely that a conflict between Russia and the West (NATO) would greatly weaken the West, it's also possible that the West could "win" such a conflict without taking serious damage (i.e. via regime change instead of war).
There is no worse outcome for China than the replacement of a neutral/friendly regime in Russia with a pro-western one.