Merge pull request #30089 from fire/cicd-crash

Headless CI/CD crash fixes
This commit is contained in:
Rémi Verschelde 2019-07-01 12:03:46 +02:00 committed by GitHub
commit b62041d1f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,6 +218,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
void EditorResourcePreview::_thread() {
#ifndef SERVER_ENABLED
exited = false;
while (!exit) {
preview_sem->wait();
@ -452,8 +453,8 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
void EditorResourcePreview::start() {
ERR_FAIL_COND(thread);
thread = Thread::create(_thread_func, this);
exited = false;
}
void EditorResourcePreview::stop() {
if (thread) {
exit = true;