The difference between when and if seems important in this construction.
Where if means that something may occur, when implies it probably will occur at some moment in the future.
That means that what when nobody shows up... sounds a bit strange, because it seems to imply that we already know that nobody will show up - which is not really a well defined event, because it presumably is equal to the current state of affairs.
On the other hand, when you organise a garden party and the dark clouds forming in the sky make it quite clear it will start raining at some point, you could ask yourself what when it starts raining?.