diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-09 17:52:40 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-12 12:53:06 +0200 |
commit | a29416e3321b678c751f5bd6ebbebed544af09aa (patch) | |
tree | 0a1746dc643ddea8ae9b79532f81823b5e2c7126 /main | |
parent | 98b50eb3083094a352b36b184d7b60b77ad982fe (diff) | |
download | redot-engine-a29416e3321b678c751f5bd6ebbebed544af09aa.tar.gz |
[Scene,Main] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/main/main.cpp b/main/main.cpp index 32262b50b3..aa2f5f2451 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -289,7 +289,7 @@ void initialize_physics() { // Physics server not found, Use the default physics physics_server_3d = PhysicsServer3DManager::get_singleton()->new_default_server(); } - ERR_FAIL_COND(!physics_server_3d); + ERR_FAIL_NULL(physics_server_3d); physics_server_3d->init(); // 2D Physics server @@ -299,7 +299,7 @@ void initialize_physics() { // Physics server not found, Use the default physics physics_server_2d = PhysicsServer2DManager::get_singleton()->new_default_server(); } - ERR_FAIL_COND(!physics_server_2d); + ERR_FAIL_NULL(physics_server_2d); physics_server_2d->init(); } @@ -3022,7 +3022,7 @@ bool Main::start() { return false; } else { Object *ml = ClassDB::instantiate(main_loop_type); - ERR_FAIL_COND_V_MSG(!ml, false, "Can't instance MainLoop type."); + ERR_FAIL_NULL_V_MSG(ml, false, "Can't instance MainLoop type."); main_loop = Object::cast_to<MainLoop>(ml); if (!main_loop) { @@ -3302,7 +3302,7 @@ bool Main::start() { scene = scenedata->instantiate(); } - ERR_FAIL_COND_V_MSG(!scene, false, "Failed loading scene: " + local_game_path); + ERR_FAIL_NULL_V_MSG(scene, false, "Failed loading scene: " + local_game_path + "."); sml->add_current_scene(scene); #ifdef MACOS_ENABLED |