A method and switching arrangement for an inverter, the inverter comprising a positive direct current pole (U DC,P ), a negative direct current pole (U DC,N ), and a neutral direct current pole (M), the arrangement comprising a first controllable switch (S X ) connected between the neutral direct current pole (M) of the inverter and a virtual neutral point of an alternating current network supplied by the inverter; and/or a second controllable switch (S Y ) connected between the neutral direct current pole (M) of the inverter and an earth potential of an alternating current network supplied by the inverter.