If your on a standard breather system or an aftermarket breather that is still connected to the metering unit (not vented to atmosphere/catch tank) then an oil leak can also cause an air leak resulting in poor idle.
There are a few other possible causes. Air leak on the intake, faulty HT circuit/plugs, poor setup, sticking metering flap etc...