From 862dadb7a7aa290e382ca02a376776e0e27987a1 Mon Sep 17 00:00:00 2001 From: Stephen Hines Date: Thu, 2 Feb 2012 13:23:20 -0800 Subject: Properly recover from failed compilation. BUG=5955072 We used to call delete, which did not update the Context's view of the world, leading to potential segfaults on Context teardown. This change also enables exceptions to be thrown when runtime errors are encountered. Change-Id: If63578efff2d7dd03639da1049c1a5ebc69fde35 --- libs/rs/rsScriptC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/rs') diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index 929dd68..b4eb995 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -322,7 +322,7 @@ RsScript rsi_ScriptCCreate(Context *rsc, if (!s->runCompiler(rsc, resName, cacheDir, (uint8_t *)text, text_length)) { // Error during compile, destroy s and return null. - delete s; + ObjectBase::checkDelete(s); return NULL; } -- cgit v1.1