A substantial fraction of disk galaxies is double-barred. We analyze the dynamical stability of such nested bar systems by means of Liapunov exponents, by fixing a generic model and varying the inner (secondary) bar mass. We show that there exists a critical mass below which the secondary bar cannot sustain its own orbital structure and above which it progressively destroys the outer (primary) bar-supporting orbits. In this critical state, a large fraction of the trajectories (regular and chaotic) is aligned with either bar, suggesting the plausibility of long-lived dynamical states when secondary-to-primary bar mass ratio is of the order of a few percent. Qualitatively similar results are obtained by varying the size of the secondary bar, within certain limits, while keeping its mass constant. In both cases, an important role appears to be played by chaotic trajectories that are trapped around (especially) the primary bar for long periods of time.