Diving after flying is fine. You need to have time after diving, before flying, to allow all the accumulated nitogen to clear your system. The danger is going from higher pressure; depth or ground level, to lower pressure; shallow or up in an airplane.