Browse Source

Added check if window position goes below zero

rsredsq 10 years ago
parent
commit
e1062636c6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/AtomicEditor/Application/AEEditorCommon.cpp

+ 1 - 1
Source/AtomicEditor/Application/AEEditorCommon.cpp

@@ -231,7 +231,7 @@ void AEEditorCommon::ValidateWindow()
         maxResolution += monitorResolution;
     }
 
-    if (windowPosition.x_ >= maxResolution.x_ || windowPosition.y_ >= maxResolution.y_ )
+    if (windowPosition.x_ >= maxResolution.x_ || windowPosition.y_ >= maxResolution.y_ || (windowPosition.x_ + graphics->GetWidth()) < 0 || (windowPosition.y_ + graphics->GetHeight()) < 0)
     {
         JSONValue prefs;