Browse Source

Merge pull request #863 from jlreymendez/dll_build_fix

Fix nullref access violation when building with no entry point
gingerBill 4 years ago
parent
commit
d0f923ba74
2 changed files with 3 additions and 1 deletions
  1. 2 0
      .gitignore
  2. 1 1
      src/checker.cpp

+ 2 - 0
.gitignore

@@ -21,6 +21,8 @@ bld/
 ![Cc]ore/[Ll]og/
 ![Cc]ore/[Ll]og/
 # Visual Studio 2015 cache/options directory
 # Visual Studio 2015 cache/options directory
 .vs/
 .vs/
+# Visual Studio Code options directory
+.vscode/
 # Uncomment if you have tasks that create the project's static files in wwwroot
 # Uncomment if you have tasks that create the project's static files in wwwroot
 #wwwroot/
 #wwwroot/
 demo
 demo

+ 1 - 1
src/checker.cpp

@@ -1907,7 +1907,7 @@ void generate_minimum_dependency_set(Checker *c, Entity *start) {
 				array_add(&c->info.testing_procedures, e);
 				array_add(&c->info.testing_procedures, e);
 			}
 			}
 		}
 		}
-	} else {
+	} else if (start != nullptr) {
 		start->flags |= EntityFlag_Used;
 		start->flags |= EntityFlag_Used;
 		add_dependency_to_set(c, start);
 		add_dependency_to_set(c, start);
 	}
 	}