diff options
| author | Juan Linietsky | 2017-12-07 12:13:20 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2017-12-07 12:13:20 -0300 |
| commit | dd892a327d39c6df71e5e447b30488d7694501b5 (patch) | |
| tree | 98c91f2486acc3f8c65fd91e9541104e62ef66fb /scene/main/viewport.cpp | |
| parent | 561490261166a61718e80fe73bc112b8e3cf4b33 (diff) | |
| download | godot-dd892a327d39c6df71e5e447b30488d7694501b5.tar.gz godot-dd892a327d39c6df71e5e447b30488d7694501b5.tar.zst godot-dd892a327d39c6df71e5e447b30488d7694501b5.zip | |
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 d864b0f76..a785abbc6 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; } } |
