Fix editor resource preview deadlocking with --headless mode
This commit is contained in:
parent
e930c8d383
commit
e395eaf447
|
@ -424,9 +424,11 @@ void EditorResourcePreview::check_for_invalidation(const String &p_path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorResourcePreview::start() {
|
void EditorResourcePreview::start() {
|
||||||
|
if (DisplayServer::get_singleton()->get_name() != "headless") {
|
||||||
ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started.");
|
ERR_FAIL_COND_MSG(thread.is_started(), "Thread already started.");
|
||||||
thread.start(_thread_func, this);
|
thread.start(_thread_func, this);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void EditorResourcePreview::stop() {
|
void EditorResourcePreview::stop() {
|
||||||
if (thread.is_started()) {
|
if (thread.is_started()) {
|
||||||
|
|
Loading…
Reference in New Issue