summaryrefslogtreecommitdiff
path: root/scene/resources/shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/shader.cpp')
-rw-r--r--scene/resources/shader.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/scene/resources/shader.cpp b/scene/resources/shader.cpp
index 89570beb5f..57e2470164 100644
--- a/scene/resources/shader.cpp
+++ b/scene/resources/shader.cpp
@@ -222,10 +222,7 @@ Error ResourceFormatSaverShader::save(const String &p_path, const RES &p_resourc
Error err;
FileAccess *file = FileAccess::open(p_path, FileAccess::WRITE, &err);
- if (err) {
-
- ERR_FAIL_COND_V(err, err);
- }
+ ERR_FAIL_COND_V_MSG(err, err, "Cannot save shader '" + p_path + "'.");
file->store_string(source);
if (file->get_error() != OK && file->get_error() != ERR_FILE_EOF) {