Forráskód Böngészése

Bugfix: Fixing a crash when opening a file in Visual Studio, while a solution is already open with a file that was deleted

BearishSun 8 éve
szülő
commit
088619fd8f
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Source/BansheeEditor/Win32/BsVSCodeEditor.cpp

+ 1 - 1
Source/BansheeEditor/Win32/BsVSCodeEditor.cpp

@@ -259,7 +259,7 @@ namespace bs
 				if (SUCCEEDED(activeDocument->get_Selection(&selection)))
 				{
 					CComPtr<EnvDTE::TextSelection> textSelection;
-					if (SUCCEEDED(selection->QueryInterface(&textSelection)))
+					if (selection != nullptr && SUCCEEDED(selection->QueryInterface(&textSelection)))
 					{
 						textSelection->GotoLine(line, TRUE);
 					}