diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index e50f8014ee1..1a4a9f13395 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -134,6 +134,12 @@ void SmartAIMgr::LoadSmartAIFromDB() SmartScriptHolder temp; temp.entryOrGuid = fields[0].GetInt32(); + if (!temp.entryOrGuid) + { + TC_LOG_ERROR("sql.sql", "SmartAIMgr::LoadSmartAIFromDB: invalid entryorguid (0), skipped loading."); + continue; + } + SmartScriptType source_type = (SmartScriptType)fields[1].GetUInt8(); if (source_type >= SMART_SCRIPT_TYPE_MAX) { |