Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost/GHOST_Rect.h')
-rw-r--r--intern/ghost/GHOST_Rect.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/ghost/GHOST_Rect.h b/intern/ghost/GHOST_Rect.h
index bcbcaded364..30d9d16b701 100644
--- a/intern/ghost/GHOST_Rect.h
+++ b/intern/ghost/GHOST_Rect.h
@@ -241,8 +241,10 @@ inline void GHOST_Rect::wrapPoint(GHOST_TInt32 &x, GHOST_TInt32 &y, GHOST_TInt32
GHOST_TInt32 h= getHeight();
/* highly unlikely but avoid eternal loop */
- if(w-ofs*2 <= 0 || h-ofs*2 <= 0)
+ if (w-ofs*2 <= 0 || h-ofs*2 <= 0) {
return;
+ }
+
while(x-ofs < m_l) x+= w-(ofs*2);
while(y-ofs < m_t) y+= h-(ofs*2);
while(x+ofs > m_r) x-= w-(ofs*2);