mod_lua: cannot assume idx != 0 if cb_fun is provided

This commit is contained in:
Leon de Rooij 2010-09-10 02:58:37 +02:00
parent 87db11afe0
commit 7eae2b629e
1 changed files with 1 additions and 1 deletions

View File

@ -367,7 +367,7 @@ int Dbh::query_callback(void *pArg, int argc, char **argv, char **cargv)
bool Dbh::query(char *sql, SWIGLUA_FN lua_fun)
{
if (connected) {
if (lua_fun.L && lua_fun.idx != 0) {
if (lua_fun.L) {
if (switch_cache_db_execute_sql_callback(dbh, sql, query_callback, &lua_fun, NULL) == SWITCH_STATUS_SUCCESS) {
return true;
}