Skip to content

Commit 9b34170

Browse files
committed
修正两个崩溃bug
1 parent 49615ca commit 9b34170

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Development/Editor/Core/ydbase/base/warcraft3/jass/func_value.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ namespace warcraft3 { namespace jass {
154154
{
155155
static mapping m = mapping::initialize_from_register();
156156

157+
if (!proc_name)
158+
{
159+
return nullptr;
160+
}
161+
157162
auto it = m.find(proc_name);
158163
if (it != m.end() && it->second.is_valid())
159164
{
@@ -167,6 +172,11 @@ namespace warcraft3 { namespace jass {
167172

168173
func_value const* japi_func(const char* proc_name)
169174
{
175+
if (!proc_name)
176+
{
177+
return nullptr;
178+
}
179+
170180
auto it = japi_mapping.find(proc_name);
171181
if (it != japi_mapping.end() && it->second.is_valid())
172182
{

0 commit comments

Comments
 (0)