Browse Source

Projucer: Fixed a potential crash when reloading a GUI builder document

tags/2021-05-28
ed 6 years ago
parent
commit
526272c4f5
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      extras/Projucer/Source/CodeEditor/jucer_SourceCodeEditor.cpp

+ 6
- 1
extras/Projucer/Source/CodeEditor/jucer_SourceCodeEditor.cpp View File

@@ -69,7 +69,12 @@ void SourceCodeDocument::reloadInternal()
auto lineFeed = getLineFeedForFile (fileContent);
if (lineFeed.isEmpty())
lineFeed = project->getProjectLineFeed();
{
if (project != nullptr)
lineFeed = project->getProjectLineFeed();
else
lineFeed = "\r\n";
}
codeDoc->setNewLineCharacters (lineFeed);


Loading…
Cancel
Save