Accurate and robust phase unwrapping is an important procedure for three dimensional (3D) profilometry measurement. The mask cut phase-unwrapping algorithm merges the characteristics of Goldstein's branch cut and reliability-guided path-following algorithms, so that it has higher accuracy and stability. However, it cannot handle discontinuous phase regions because it completely relies on the phase quality map to guide the placement of mask cuts, thereby easily causing phase error propagation. To overcome these drawbacks, we propose a new phase-unwrapping method that merges the residue check principle and a Laplace phase derivative variance quality map that we developed. First, the entire phase was divided into several isolated regions in accordance with the quality map. Then, each pixel of the absolute phase marker line was taken as the starting point to unwrap the discontinuous phase regions based on reliability guidance. In addition, a new list-trimming algorithm was employed to guarantee a speedy phase-unwrapping procedure. The entire phase unwrapping and accurate 3D measurement of discontinuous objects was successfully completed. The simulated and experimental data both demonstrate the validity of the proposed phase-unwrapping algorithm.