summaryrefslogtreecommitdiff
path: root/servers/visual
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-04-19 16:46:52 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-04-19 16:46:52 -0300
commita4c1fa12a54df2fe332db2ab08a03c844e4dcc93 (patch)
tree0e3fa1b801c174b1e56d81d2744be05361fbcd46 /servers/visual
parent0360b454a432dc851cc1c5b0c365049ebafcec46 (diff)
heck
Diffstat (limited to 'servers/visual')
-rw-r--r--servers/visual/visual_server_raster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp
index 18fd4c9922..2108e5b9c2 100644
--- a/servers/visual/visual_server_raster.cpp
+++ b/servers/visual/visual_server_raster.cpp
@@ -1111,12 +1111,12 @@ void VisualServerRaster::viewport_set_render_target_update_mode(RID p_viewport,R
Viewport *viewport = viewport_owner.get( p_viewport );
ERR_FAIL_COND(!viewport);
- if (viewport->update_list.in_list())
+ if (viewport->render_target.is_valid() && viewport->update_list.in_list())
viewport_update_list.remove(&viewport->update_list);
viewport->render_target_update_mode=p_mode;
- if (viewport->render_target_update_mode!=RENDER_TARGET_UPDATE_DISABLED)
+ if (viewport->render_target.is_valid() &&viewport->render_target_update_mode!=RENDER_TARGET_UPDATE_DISABLED)
viewport_update_list.add(&viewport->update_list);
}