Napkin math (aka pure speculation) suggests that unless the rogue planet hit the star directly and at an angle that could send ejecta our way, the results would be more observational than catastrophic.
The Earth is roughly 333,000 times less massive than the Sun. Think of it this way, If an asteroid hit the Earth that was, in relative terms, the size of the earth relative to the sun, it would be about 1/3 the size of Ceres. Everything on Earth would die but the other planets would probably not notice.
Given that the surface of the Sun can be treated, to a first approximation, as a fluid, an impact that was perpendicular to the surface would likely have the same characteristics of a milk drop. Which is to say a large wave would race away from the impact point and the collapsing of that wave in would eject a bit of coronal mass roughly equal to 1% of the mass of the impactor (note this makes a big, and unsupported, assumption about the viscosity of the solar corona.)
The only scary bit comes if the rogue planet enters the solar system slightly off the plane of the ecliptic and hits the Sun in a glancing blow. In such a scenario it could transfer a huge amount of momentum into the coronal mass which would then immediately begin to head away from the Sun. If the Earth were in the path of that mass it would probably wipe everything out after blowing off our atmosphere.
This wouldn't be good for the rogue planet either, which would probably enter a hyperbolic orbit and shoot away from the solar system on a new trajectory. In the unfortunate circumstance that this "coronal braking maneuver" was sufficient to slow the planet enough to be captured by the Sun, the remaining planets would get to witness periodic brushes with the Sun by the rogue planet until it had lost enough energy to fall into the Sun.
That would be mitigated if the orbit it fell into pulled it by Jupiter or another large planet which, by virtue of its gravity circularize the orbit sufficiently that it would not come near the corona on future orbits.