DwM: assert when uniforms aren't found

More useful when this error shows up early
This commit is contained in:
Campbell Barton 2017-05-20 23:54:58 +10:00
parent 8e3cefd0d5
commit 53d1026f2a
1 changed files with 2 additions and 2 deletions

View File

@ -623,7 +623,7 @@ static void DRW_interface_uniform(DRWShadingGroup *shgroup, const char *name,
if (uni->location == -1) {
if (G.debug & G_DEBUG)
fprintf(stderr, "Uniform '%s' not found!\n", name);
BLI_assert(0);
MEM_freeN(uni);
return;
}
@ -643,7 +643,7 @@ static void DRW_interface_attrib(DRWShadingGroup *shgroup, const char *name, DRW
if (attrib->location == -1 && !dummy) {
if (G.debug & G_DEBUG)
fprintf(stderr, "Attribute '%s' not found!\n", name);
BLI_assert(0);
MEM_freeN(attrib);
return;
}