Avoid mirroring to go negative to fix crash, closes #4036

This commit is contained in:
Juan Linietsky 2016-06-26 16:51:13 -03:00
parent 8baa85d6b4
commit 10f411b47b

View file

@ -85,6 +85,11 @@ void ParallaxLayer::_update_mirroring() {
void ParallaxLayer::set_mirroring(const Size2& p_mirroring) {
mirroring=p_mirroring;
if (mirroring.x<0)
mirroring.x=0;
if (mirroring.y<0)
mirroring.y=0;
_update_mirroring();
}