A correct Ginzburg-Landau free-energy functional for exchange (EX) and electromagnetic (EM) effects in a magnetic superconductor is derived. We study the second-order transition from the superconducting phase to the superconducting phase with helical spin order. The temperature T M of the onset of the helical ordering and the wave vector of the helix Q are calculated for some cases.