diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-01 14:59:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-01 14:59:29 +0200 |
commit | 6b30f284a0544972f761be3e92ad8d1b176c9f9f (patch) | |
tree | 5edd19124ce8c9265a869a8171541d5ff7c60e17 /modules | |
parent | b0ce9401ffa731cc346ab6762fd0794709634428 (diff) | |
parent | 7d8d337b2c47df88498067ff9091386691242144 (diff) |
Merge pull request #29980 from Dentrax/directed-by-qarmin
Fix some editor crashes
Diffstat (limited to 'modules')
-rw-r--r-- | modules/bullet/rigid_body_bullet.cpp | 4 | ||||
-rw-r--r-- | modules/gdscript/gdscript_function.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp index 733a900396..085cce9733 100644 --- a/modules/bullet/rigid_body_bullet.cpp +++ b/modules/bullet/rigid_body_bullet.cpp @@ -866,7 +866,7 @@ void RigidBodyBullet::on_enter_area(AreaBullet *p_area) { if (p_area->is_spOv_gravityPoint()) { ++countGravityPointSpaces; - assert(0 < countGravityPointSpaces); + ERR_FAIL_COND(countGravityPointSpaces <= 0); } } @@ -888,7 +888,7 @@ void RigidBodyBullet::on_exit_area(AreaBullet *p_area) { if (wasTheAreaFound) { if (p_area->is_spOv_gravityPoint()) { --countGravityPointSpaces; - assert(0 <= countGravityPointSpaces); + ERR_FAIL_COND(countGravityPointSpaces < 0); } --areaWhereIamCount; diff --git a/modules/gdscript/gdscript_function.cpp b/modules/gdscript/gdscript_function.cpp index bae5eca218..ad48aa1d28 100644 --- a/modules/gdscript/gdscript_function.cpp +++ b/modules/gdscript/gdscript_function.cpp @@ -1556,14 +1556,14 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a //error // function, file, line, error, explanation String err_file; - if (p_instance) + if (p_instance && p_instance->script->is_valid() && p_instance->script->path != "") err_file = p_instance->script->path; else if (script) err_file = script->path; if (err_file == "") err_file = "<built-in>"; String err_func = name; - if (p_instance && p_instance->script->name != "") + if (p_instance && p_instance->script->is_valid() && p_instance->script->name != "") err_func = p_instance->script->name + "." + err_func; int err_line = line; if (err_text == "") { |