We use theory and computer simulation to study the structure and phase behavior of colloid-polymer mixtures in the presence of quenched disorder. The Asakura-Oosawa model (AO) (Asakura and Oosawa 1954 J. Chem. Phys. 22 1255) is used to describe the colloid-colloid, colloid-polymer, and polymer-polymer pair interactions. We then investigate the behavior of this model in the presence of frozen-in (quenched) obstacles. The obstacles will be placed according to two different scenarios, both of which are experimentally feasible. In the first scenario, polymers are distributed at positions drawn from an ideal gas configuration. In the second scenario, colloidal particles are distributed at positions drawn from an equilibrium hard sphere configuration. We investigate how the unmixing transition of the AO model is affected by the type of quenched disorder. The theoretical formalism is based on the replica method of Given and Stell (1994 Physica A 209 495). Our foremost aim is to test the accuracy of three common closures to the replica Ornstein-Zernike equations, namely the hypernetted chain, the Percus-Yevick, and the Martinov-Sarkisov equations. The accuracy is determined by comparison with grand canonical Monte Carlo simulations. We find that, for quenched polymer disorder, all three closures perform remarkably well. However, when quenched colloid disorder is considered, i.e. the second mentioned scenario, the predictions of all three closures worsen dramatically.