mirror of https://github.com/godotengine/godot
Merge pull request #101182 from stuartcarnie/editor_crash_import
Editor: Fix crash when using `--import --verbose` due to use-after-free
This commit is contained in:
commit
21a6bd8dca
|
|
@ -522,6 +522,14 @@ void EditorResourcePreview::_bind_methods() {
|
||||||
ADD_SIGNAL(MethodInfo("preview_invalidated", PropertyInfo(Variant::STRING, "path")));
|
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) {
|
void EditorResourcePreview::check_for_invalidation(const String &p_path) {
|
||||||
bool call_invalidated = false;
|
bool call_invalidated = false;
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,7 @@ class EditorResourcePreview : public Node {
|
||||||
void _update_thumbnail_sizes();
|
void _update_thumbnail_sizes();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
void _notification(int p_what);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue