summaryrefslogtreecommitdiff
path: root/modules/gridmap
diff options
context:
space:
mode:
authorFranklin Sobrinho <franklin_gs@hotmail.com>2015-06-23 12:07:17 -0300
committerFranklin Sobrinho <franklin_gs@hotmail.com>2015-06-23 12:07:17 -0300
commitfaf8b410b1e5b48ee5210e06c81cf3f4edb6469d (patch)
treef710242243572ae861e8fedd9127742cc0dc7dee /modules/gridmap
parent8b61a3c358cc2ca68e12895c7243139be0301a85 (diff)
Fix for issue related to GridMap editor
* closes #2102
Diffstat (limited to 'modules/gridmap')
-rw-r--r--modules/gridmap/grid_map_editor_plugin.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/gridmap/grid_map_editor_plugin.cpp b/modules/gridmap/grid_map_editor_plugin.cpp
index 40dd0603fb..3d56b04cac 100644
--- a/modules/gridmap/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/grid_map_editor_plugin.cpp
@@ -522,7 +522,9 @@ void GridMapEditor::_duplicate_paste() {
}
bool GridMapEditor::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) {
-
+ if (!node) {
+ return false;
+ }
if (edit_mode->get_selected()==0) { // regular click
switch (p_event.type) {
@@ -1059,7 +1061,9 @@ void GridMapEditor::_notification(int p_what) {
}
void GridMapEditor::_update_cursor_instance() {
-
+ if (!node) {
+ return;
+ }
if (cursor_instance.is_valid())
VisualServer::get_singleton()->free(cursor_instance);
@@ -1098,7 +1102,9 @@ void GridMapEditor::_clear_areas() {
}
void GridMapEditor::_update_areas_display() {
-
+ if (!node) {
+ return;
+ }
_clear_areas();
List<int> areas;