This is true of Cisco Catalyst and as far as I know all Cisco switches:
If you already have made both switches stack members, the slave switch should be elected to master if the current master becomes unavailable.
I believe the original master will be reelected upon a power cycle of the stack, or just the slave I suppose, assuming the original master is again online/available.
From cisco.com:
When is the stack master elected?
-When the whole switch stack is reset
-When the stack master is reset or powered off
Note: If you reset the stack master, it would reset the whole stack.
-When the stack master is removed from the stack
-When the stack master switch has failed
Within these events, the current stack master has a greater chance to get re-elected.