In Germany and Austria the drivers insurance will always(1) cover you, no matter if the driver is making profit from the ride or not. I guess this will be similar in other EU countries, though the amount of cover might differ.
In case the driver is violating his insurance terms e.g. by doing for profit rides, the insurance will then try to get their money back from the driver or the owner of the car.
References (in German):
- Austria: http://www.oeamtc.at/portal/insassen-gehen-bei-unfall-nie-leer-aus+2500+1128899
- Germany: http://www.mitfahrgelegenheit.at/pages/service_insurance
(1) Exception: vis major, e.g. the accident was caused by lightning struck, storm etc.