diff options
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r-- | scene/main/viewport.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index d864b0f763..a785abbc65 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -936,6 +936,9 @@ void Viewport::_camera_remove(Camera *p_camera) { cameras.erase(p_camera); if (camera == p_camera) { + if (camera && find_world().is_valid()) { + camera->notification(Camera::NOTIFICATION_LOST_CURRENT); + } camera = NULL; } } |