From 3e52c7a59225f648a28edae7755a981d0a43da5a Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sat, 21 Nov 2009 13:24:12 +0000 Subject: [PATCH] Update #1013 with a temporary fix. Changes to wxString in wx 2.9 caused the issue, because wxString::c_string() no longer returned a wchar_t* or char* and thus those weren't caught by the proper exception handler. This fix should be replaced with a proper exception type later. Originally committed to SVN as r3813. --- aegisub/src/auto4_lua.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aegisub/src/auto4_lua.cpp b/aegisub/src/auto4_lua.cpp index 4daf6f1b6..ee791af8f 100644 --- a/aegisub/src/auto4_lua.cpp +++ b/aegisub/src/auto4_lua.cpp @@ -229,7 +229,7 @@ namespace Automation4 { if (lua_load(L, script_reader.reader_func, &script_reader, GetPrettyFilename().mb_str(wxConvUTF8))) { wxString *err = new wxString(lua_tostring(L, -1), wxConvUTF8); err->Prepend(_T("Error loading Lua script \"") + GetPrettyFilename() + _T("\":\n\n")); - throw err->c_str(); + throw err->wx_str(); } _stackcheck.check_stack(1); // and execute it @@ -239,7 +239,7 @@ namespace Automation4 { // error occurred, assumed to be on top of Lua stack wxString *err = new wxString(lua_tostring(L, -1), wxConvUTF8); err->Prepend(_T("Error initialising Lua script \"") + GetPrettyFilename() + _T("\":\n\n")); - throw err->c_str(); + throw err->wx_str(); } _stackcheck.check_stack(0); lua_getglobal(L, "version");