Module: Mesa Branch: master Commit: d72f1c3b80f84e8bceb414439b679b3fe71ec5b9 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d72f1c3b80f84e8bceb414439b679b3fe71ec5b9
Author: Marek Olšák <[email protected]> Date: Wed Apr 14 20:23:15 2010 +0200 r300g: fix possible crash when shader compilation fails This hopefully fixes the crash in the FDO bug #27634, not the bug itself. --- src/gallium/drivers/r300/r300_fs.c | 3 +++ src/gallium/drivers/r300/r300_vs.c | 3 +++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/gallium/drivers/r300/r300_fs.c b/src/gallium/drivers/r300/r300_fs.c index 8da0796..3cddf98 100644 --- a/src/gallium/drivers/r300/r300_fs.c +++ b/src/gallium/drivers/r300/r300_fs.c @@ -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. */ diff --git a/src/gallium/drivers/r300/r300_vs.c b/src/gallium/drivers/r300/r300_vs.c index 8137972..bfab9c3 100644 --- a/src/gallium/drivers/r300/r300_vs.c +++ b/src/gallium/drivers/r300/r300_vs.c @@ -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. */ _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
