Browse Source

Merge pull request #30817 from YeldhamDev/body_warning_fix

Fix wrong placement of new line in 'PhysicsBody' warning
Rémi Verschelde 6 years ago
parent
commit
eb16c9830b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scene/3d/collision_object.cpp

+ 1 - 1
scene/3d/collision_object.cpp

@@ -370,7 +370,7 @@ String CollisionObject::get_configuration_warning() const {
 	String warning = Spatial::get_configuration_warning();
 	String warning = Spatial::get_configuration_warning();
 
 
 	if (shapes.empty()) {
 	if (shapes.empty()) {
-		if (warning == String()) {
+		if (!warning.empty()) {
 			warning += "\n\n";
 			warning += "\n\n";
 		}
 		}
 		warning += TTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape or CollisionPolygon as a child to define its shape.");
 		warning += TTR("This node has no shape, so it can't collide or interact with other objects.\nConsider adding a CollisionShape or CollisionPolygon as a child to define its shape.");