shadertool: Fix bug in error path