Crash when adding new x-range
Steps to reproduce:
- create a new plot
- add the second x-range
- uncheck "auto" and specify for example 10 for x_max for the second range
- observe the crash
Seems to be a regression introduced recently. We need to check the same behavior for y-range and for plot ranges, too.