Voltage divider with potentiometer - Failsafe
Add a zener diode parallel with RV1 (with cathode connected to Vmeasure and anode connected to Vref). Choose a proper zener with a voltage according to the minimum allowable/safe value of Vref and the value of Vmeasure: Vzener = (Vmeasure - Vref_minimum).
In this way, Vref would never fall to zero, instead falls to Vmeasure - Vzener