From cddb530b4de1521f59261dd53498e49a4050191b Mon Sep 17 00:00:00 2001
From: "Brad Payne (Vir Linden)" <vir@lindenlab.com>
Date: Fri, 19 Jan 2018 14:05:59 +0000
Subject: [PATCH] Skip warning about direct launch of viewer if running under
 debugger. Currently this check should work on windows and linux.

---
 indra/newview/llappviewer.cpp      | 5 ++++-
 indra/newview/llappviewerwin32.cpp | 5 +++++
 indra/newview/llappviewerwin32.h   | 1 +
 3 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index e74ee7154f8..5f4355ce6c3 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1110,7 +1110,10 @@ bool LLAppViewer::init()
 		// situation to do things the Right Way. Anyone who intentionally
 		// bypasses this mechanism needs no reminder that s/he's shooting
 		// him/herself in the foot.
-		LLNotificationsUtil::add("RunLauncher");
+		if (!beingDebugged())
+		{
+			LLNotificationsUtil::add("RunLauncher");
+		}
 	}
 
 #if LL_WINDOWS
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 48b3a1c485a..de764ae3000 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -646,6 +646,11 @@ bool LLAppViewerWin32::initParseCommandLine(LLCommandLineParser& clp)
 	return true;
 }
 
+bool LLAppViewerWin32::beingDebugged()
+{
+    return IsDebuggerPresent();
+}
+
 bool LLAppViewerWin32::restoreErrorTrap()
 {	
 	return true;
diff --git a/indra/newview/llappviewerwin32.h b/indra/newview/llappviewerwin32.h
index 59d1ddaa3df..c5fae6a3a3b 100644
--- a/indra/newview/llappviewerwin32.h
+++ b/indra/newview/llappviewerwin32.h
@@ -49,6 +49,7 @@ class LLAppViewerWin32 : public LLAppViewer
 	virtual bool initHardwareTest(); // Win32 uses DX9 to test hardware.
 	virtual bool initParseCommandLine(LLCommandLineParser& clp);
 
+	virtual bool beingDebugged();
 	virtual bool restoreErrorTrap();
 	virtual void initCrashReporting(bool reportFreeze); 
 
-- 
GitLab