From 32990fce4994ec66e64d4498d85a75f90cb2b2cd Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 21 Sep 2013 16:10:53 -0700 Subject: [PATCH] Don't try to add stack traces to non-string errors --- aegisub/src/auto4_lua.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aegisub/src/auto4_lua.cpp b/aegisub/src/auto4_lua.cpp index 17cab26fe..187b0095c 100644 --- a/aegisub/src/auto4_lua.cpp +++ b/aegisub/src/auto4_lua.cpp @@ -613,7 +613,10 @@ namespace Automation4 { lua_pop(L, 1); } - std::string message = get_string_or_default(L, 1); + const char *err = lua_tostring(L, 1); + if (!err) return 1; + + std::string message = err; if (lua_gettop(L)) lua_pop(L, 1);