mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 21:22:48 +00:00
Fix crash on asset lib install
This is not the perfect solution, but fixes the crash and avoid a dependency on EditorNode.
This commit is contained in:
parent
6377969000
commit
1a1b62748a
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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!");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user