Avoid mirroring to go negative to fix crash, closes #4036
(cherry picked from commit 10f411b47b
)
This commit is contained in:
parent
ea7da3bf08
commit
9a7c310134
|
@ -59,6 +59,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();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue