1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

fix headless import attempting to load graphics driver

This commit is contained in:
Travis Lange
2024-10-22 16:17:09 -04:00
parent 92e51fca72
commit 2e1fc241f9
3 changed files with 18 additions and 1 deletions

View File

@@ -31,7 +31,10 @@
#include "rendering_device_binds.h"
Error RDShaderFile::parse_versions_from_text(const String &p_text, const String p_defines, OpenIncludeFunction p_include_func, void *p_include_func_userdata) {
ERR_FAIL_NULL_V(RenderingDevice::get_singleton(), ERR_UNAVAILABLE);
ERR_FAIL_NULL_V_MSG(
RenderingDevice::get_singleton(),
ERR_UNAVAILABLE,
"Cannot import custom .glsl shaders when running without a RenderingDevice. This can happen if you are using the headless more or the Compatibility backend.");
Vector<String> lines = p_text.split("\n");