Prevent crashing if we create the project while current workspace is null.

This commit is contained in:
drug007 2017-03-02 17:50:38 +03:00
parent af8babdf1b
commit 00e17a8d3b
1 changed files with 4 additions and 2 deletions

View File

@ -379,8 +379,10 @@ class Project : WorkspaceItem {
super(fname);
_workspace = ws;
foreach(obj; _workspace.includePath.array)
includePath ~= obj.str;
if (_workspace) {
foreach(obj; _workspace.includePath.array)
includePath ~= obj.str;
}
_items = new ProjectFolder(fname);
_dependencyVersion = dependencyVersion;