mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 07:53:26 +00:00
Editor: Fix crash when using --import --verbose
due to use-after-free
This commit is contained in:
parent
1aaf20b1f1
commit
501fc1a6ff
2 changed files with 9 additions and 0 deletions
|
@ -522,6 +522,14 @@ void EditorResourcePreview::_bind_methods() {
|
|||
ADD_SIGNAL(MethodInfo("preview_invalidated", PropertyInfo(Variant::STRING, "path")));
|
||||
}
|
||||
|
||||
void EditorResourcePreview::_notification(int p_what) {
|
||||
switch (p_what) {
|
||||
case NOTIFICATION_EXIT_TREE: {
|
||||
stop();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
void EditorResourcePreview::check_for_invalidation(const String &p_path) {
|
||||
bool call_invalidated = false;
|
||||
{
|
||||
|
|
|
@ -123,6 +123,7 @@ class EditorResourcePreview : public Node {
|
|||
void _update_thumbnail_sizes();
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue