summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shader_query.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/shader_query.cpp')
-rw-r--r--src/mesa/main/shader_query.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp
index 185e95d8f2b..c7062abe7d8 100644
--- a/src/mesa/main/shader_query.cpp
+++ b/src/mesa/main/shader_query.cpp
@@ -1058,12 +1058,12 @@ _mesa_get_program_resourceiv(struct gl_shader_program *shProg,
int props_written =
_mesa_program_resource_prop(shProg, res, index, *prop, val,
"glGetProgramResourceiv");
- if (props_written) {
- amount += props_written;
- } else {
- /* Error happened. */
+
+ /* Error happened. */
+ if (props_written == 0)
return;
- }
+
+ amount += props_written;
}
/* If <length> is not NULL, the actual number of integer values