As long as your amplifier has an input selection switch, you can have them both connected and also sending a signal, and switch between inputs.
Two caveats:
- Depending on the amplifier's circuitry, you may get noise or signal bleed from the unselected input.
- If the amplifier manufacturer didn't implement the input selection properly, then something very bad could happen. Generally speaking this shouldn't be an issue.