From ecdb6721305662e620f68e7a56838f6b31165c7b Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Feb 2019 02:11:59 +0100 Subject: [PATCH] Add simple checks against invalid window position. --- profiler/src/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/profiler/src/main.cpp b/profiler/src/main.cpp index a859efb4..dbd2248e 100644 --- a/profiler/src/main.cpp +++ b/profiler/src/main.cpp @@ -108,6 +108,14 @@ int main( int argc, char** argv ) h = data[3]; maximize = data[4]; } + if( w <= 0 || h <= 0 || x+w < 0 || y+h < 0 ) + { + x = 200; + y = 200; + w = 1650; + h = 960; + maximize = 0; + } } std::string connHistFile = tracy::GetSavePath( "connection.history" );