mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +00:00
Memory leak and crash fixes
This commit is contained in:
parent
4569f5ec82
commit
7dda9309f9
10 changed files with 24 additions and 4 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue