You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Memory leak and crash fixes
This commit is contained in:
@@ -103,9 +103,11 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES &p_from, const Size2
|
||||
img = ltex->to_image();
|
||||
} else {
|
||||
Ref<Texture> tex = p_from;
|
||||
img = tex->get_data();
|
||||
if (img.is_valid()) {
|
||||
img = img->duplicate();
|
||||
if (tex.is_valid()) {
|
||||
img = tex->get_data();
|
||||
if (img.is_valid()) {
|
||||
img = img->duplicate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user