Sorry, I brain farted. This actually happened in 1950. Bob Menzies became PM in 1949 though.
https://www.legislation.gov.au/Details/C1950A00016#:~:text=An%20Act%20to%20provide%20for,and%20for%20purposes%20connected%20therewith.&text=COMMUNIST%20PARTY%20DISSOLUTION.