Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
7dda9309
Commit
7dda9309
authored
Nov 10, 2019
by
Rafał Mikrut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Memory leak and crash fixes
parent
4569f5ec
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
24 additions
and
4 deletions
+24
-4
editor_resource_preview.cpp
editor/editor_resource_preview.cpp
+1
-0
canvas_item_editor_plugin.cpp
editor/plugins/canvas_item_editor_plugin.cpp
+1
-0
editor_preview_plugins.cpp
editor/plugins/editor_preview_plugins.cpp
+5
-3
texture_loader_pkm.cpp
modules/etc/texture_loader_pkm.cpp
+2
-0
video_stream_theora.cpp
modules/theora/video_stream_theora.cpp
+2
-0
video_stream_webm.cpp
modules/webm/video_stream_webm.cpp
+2
-0
range.cpp
scene/gui/range.cpp
+1
-0
tree.cpp
scene/gui/tree.cpp
+1
-0
texture.cpp
scene/resources/texture.cpp
+8
-1
audio_effect_record.cpp
servers/audio/effects/audio_effect_record.cpp
+1
-0
No files found.
editor/editor_resource_preview.cpp
View file @
7dda9309
...
...
@@ -207,6 +207,7 @@ void EditorResourcePreview::_generate_preview(Ref<ImageTexture> &r_texture, Ref<
f
->
store_line
(
itos
(
has_small_texture
));
f
->
store_line
(
itos
(
FileAccess
::
get_modified_time
(
p_item
.
path
)));
f
->
store_line
(
FileAccess
::
get_md5
(
p_item
.
path
));
f
->
close
();
memdelete
(
f
);
}
}
...
...
editor/plugins/canvas_item_editor_plugin.cpp
View file @
7dda9309
...
...
@@ -5215,6 +5215,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
snap_other_nodes
=
true
;
snap_guides
=
true
;
snap_rotation
=
false
;
snap_scale
=
false
;
snap_relative
=
false
;
snap_pixel
=
false
;
snap_target
[
0
]
=
SNAP_TARGET_NONE
;
...
...
editor/plugins/editor_preview_plugins.cpp
View file @
7dda9309
...
...
@@ -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
();
}
}
}
...
...
modules/etc/texture_loader_pkm.cpp
View file @
7dda9309
...
...
@@ -91,6 +91,8 @@ RES ResourceFormatPKM::load(const String &p_path, const String &p_original_path,
if
(
r_error
)
*
r_error
=
OK
;
f
->
close
();
memdelete
(
f
);
return
texture
;
}
...
...
modules/theora/video_stream_theora.cpp
View file @
7dda9309
...
...
@@ -741,6 +741,8 @@ RES ResourceFormatLoaderTheora::load(const String &p_path, const String &p_origi
*
r_error
=
OK
;
}
f
->
close
();
memdelete
(
f
);
return
ogv_stream
;
}
...
...
modules/webm/video_stream_webm.cpp
View file @
7dda9309
...
...
@@ -484,6 +484,8 @@ RES ResourceFormatLoaderWebm::load(const String &p_path, const String &p_origina
*
r_error
=
OK
;
}
f
->
close
();
memdelete
(
f
);
return
webm_stream
;
}
...
...
scene/gui/range.cpp
View file @
7dda9309
...
...
@@ -213,6 +213,7 @@ void Range::unshare() {
nshared
->
val
=
shared
->
val
;
nshared
->
step
=
shared
->
step
;
nshared
->
page
=
shared
->
page
;
nshared
->
exp_ratio
=
shared
->
exp_ratio
;
nshared
->
allow_greater
=
shared
->
allow_greater
;
nshared
->
allow_lesser
=
shared
->
allow_lesser
;
_unref_shared
();
...
...
scene/gui/tree.cpp
View file @
7dda9309
...
...
@@ -4050,6 +4050,7 @@ Tree::Tree() {
drop_mode_section
=
0
;
single_select_defer
=
NULL
;
scrolling
=
false
;
allow_rmb_select
=
false
;
force_edit_checkbox_only_on_checkbox
=
false
;
...
...
scene/resources/texture.cpp
View file @
7dda9309
...
...
@@ -2369,16 +2369,20 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String
if
(
header
[
0
]
==
'G'
&&
header
[
1
]
==
'D'
&&
header
[
2
]
==
'3'
&&
header
[
3
]
==
'T'
)
{
if
(
tex3d
.
is_null
())
{
f
->
close
();
memdelete
(
f
);
ERR_FAIL_COND_V
(
tex3d
.
is_null
(),
RES
())
}
}
else
if
(
header
[
0
]
==
'G'
&&
header
[
1
]
==
'D'
&&
header
[
2
]
==
'A'
&&
header
[
3
]
==
'T'
)
{
if
(
texarr
.
is_null
())
{
f
->
close
();
memdelete
(
f
);
ERR_FAIL_COND_V
(
texarr
.
is_null
(),
RES
())
}
}
else
{
f
->
close
();
memdelete
(
f
);
ERR_FAIL_V_MSG
(
RES
(),
"Unrecognized layered texture file format '"
+
String
((
const
char
*
)
header
)
+
"'."
);
}
...
...
@@ -2418,6 +2422,7 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String
if
(
r_error
)
{
*
r_error
=
ERR_FILE_CORRUPT
;
}
f
->
close
();
memdelete
(
f
);
ERR_FAIL_V
(
RES
());
}
...
...
@@ -2453,6 +2458,7 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String
if
(
r_error
)
{
*
r_error
=
ERR_FILE_CORRUPT
;
}
f
->
close
();
memdelete
(
f
);
ERR_FAIL_V
(
RES
());
}
...
...
@@ -2473,8 +2479,9 @@ RES ResourceFormatLoaderTextureLayered::load(const String &p_path, const String
if
(
bytes
!=
total_size
)
{
if
(
r_error
)
{
*
r_error
=
ERR_FILE_CORRUPT
;
memdelete
(
f
);
}
f
->
close
();
memdelete
(
f
);
ERR_FAIL_V
(
RES
());
}
}
...
...
servers/audio/effects/audio_effect_record.cpp
View file @
7dda9309
...
...
@@ -297,4 +297,5 @@ void AudioEffectRecord::_bind_methods() {
AudioEffectRecord
::
AudioEffectRecord
()
{
format
=
AudioStreamSample
::
FORMAT_16_BITS
;
recording_active
=
false
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment