|
@@ -442,6 +442,9 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s
|
|
|
|
|
|
if (texture.is_valid()) {
|
|
if (texture.is_valid()) {
|
|
image = texture->get_data();
|
|
image = texture->get_data();
|
|
|
|
+ if (image.is_valid()) {
|
|
|
|
+ image->duplicate();
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
if (!image.is_valid() && atlas_texture.is_valid()) {
|
|
if (!image.is_valid() && atlas_texture.is_valid()) {
|
|
@@ -468,6 +471,8 @@ void OS_JavaScript::set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_s
|
|
|
|
|
|
ERR_FAIL_COND(!image.is_valid());
|
|
ERR_FAIL_COND(!image.is_valid());
|
|
|
|
|
|
|
|
+ image = image->duplicate();
|
|
|
|
+
|
|
if (atlas_texture.is_valid())
|
|
if (atlas_texture.is_valid())
|
|
image->crop_from_point(
|
|
image->crop_from_point(
|
|
atlas_rect.position.x,
|
|
atlas_rect.position.x,
|