r300g: fix possible crash when shader compilation fails

This hopefully fixes the crash in the FDO bug #27634, not the bug itself.
This commit is contained in:
Marek Olšák 2010-04-14 20:23:15 +02:00
parent 0863c7e499
commit d72f1c3b80
2 changed files with 6 additions and 0 deletions

View file

@ -278,7 +278,10 @@ static void r300_translate_fragment_shader(
"Giving up...\n");
abort();
}
rc_destroy(&compiler.Base);
r300_dummy_fragment_shader(r300, shader);
return;
}
/* Initialize numbers of constants for each type. */

View file

@ -330,7 +330,10 @@ void r300_translate_vertex_shader(struct r300_context* r300,
"Giving up...\n");
abort();
}
rc_destroy(&compiler.Base);
r300_dummy_vertex_shader(r300, vs);
return;
}
/* Initialize numbers of constants for each type. */