summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2016-07-10 17:19:19 -0300
committerGeorge Marques <george@gmarqu.es>2016-07-10 17:19:29 -0300
commit1a1b62748a01928401a344b8c538b59f75706ece (patch)
tree199bf163665cc5087159342b28e4958a61b6a21f
parent637796900080cfcf407e1045f10e6e9040c8d33e (diff)
downloadredot-engine-1a1b62748a01928401a344b8c538b59f75706ece.tar.gz
Fix crash on asset lib install
This is not the perfect solution, but fixes the crash and avoid a dependency on EditorNode.
-rw-r--r--main/main.cpp2
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp3
-rw-r--r--tools/editor/editor_asset_installer.cpp6
3 files changed, 8 insertions, 3 deletions
diff --git a/main/main.cpp b/main/main.cpp
index adaebab1d4..aa8540632f 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1504,6 +1504,8 @@ bool Main::start() {
if (project_manager_request || (script=="" && test=="" && game_path=="" && !editor)) {
ProjectManager *pmanager = memnew( ProjectManager );
+ ProgressDialog *progress_dialog = memnew( ProgressDialog );
+ pmanager->add_child(progress_dialog);
sml->get_root()->add_child(pmanager);
OS::get_singleton()->set_context(OS::CONTEXT_PROJECTMAN);
}
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp
index ee535310bc..f132e94690 100644
--- a/tools/editor/asset_library_editor_plugin.cpp
+++ b/tools/editor/asset_library_editor_plugin.cpp
@@ -600,7 +600,8 @@ void EditorAssetLibrary::_install_asset() {
EditorAssetLibraryItemDownload *d = downloads_hb->get_child(i)->cast_to<EditorAssetLibraryItemDownload>();
if (d && d->get_asset_id() == description->get_asset_id()) {
- EditorNode::get_singleton()->show_warning("Download for this asset is already in progress!");
+ if (EditorNode::get_singleton() != NULL)
+ EditorNode::get_singleton()->show_warning("Download for this asset is already in progress!");
return;
}
}
diff --git a/tools/editor/editor_asset_installer.cpp b/tools/editor/editor_asset_installer.cpp
index ec36773d8d..b6051886c0 100644
--- a/tools/editor/editor_asset_installer.cpp
+++ b/tools/editor/editor_asset_installer.cpp
@@ -317,9 +317,11 @@ void EditorAssetInstaller::ok_pressed() {
}
msg+=failed_files[i];
}
- EditorNode::get_singleton()->show_warning(msg);
+ if (EditorNode::get_singleton() != NULL)
+ EditorNode::get_singleton()->show_warning(msg);
} else {
- EditorNode::get_singleton()->show_warning("Package Installed Successfully!","Success!");
+ if (EditorNode::get_singleton() != NULL)
+ EditorNode::get_singleton()->show_warning("Package Installed Successfully!","Success!");
}