Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
GNOME
GIMP
Commits
94e757df
Commit
94e757df
authored
Jun 22, 2010
by
Michael Natterer
😴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app: don't leak options->language; add finalize() to free it
parent
cf1cc6dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
app/tools/gimptextoptions.c
app/tools/gimptextoptions.c
+18
-0
No files found.
app/tools/gimptextoptions.c
View file @
94e757df
...
...
@@ -70,6 +70,7 @@ enum
};
static
void
gimp_text_options_finalize
(
GObject
*
object
);
static
void
gimp_text_options_set_property
(
GObject
*
object
,
guint
property_id
,
const
GValue
*
value
,
...
...
@@ -98,12 +99,15 @@ G_DEFINE_TYPE_WITH_CODE (GimpTextOptions, gimp_text_options,
G_IMPLEMENT_INTERFACE
(
GIMP_TYPE_RECTANGLE_OPTIONS
,
NULL
))
#define parent_class gimp_text_options_parent_class
static
void
gimp_text_options_class_init
(
GimpTextOptionsClass
*
klass
)
{
GObjectClass
*
object_class
=
G_OBJECT_CLASS
(
klass
);
object_class
->
finalize
=
gimp_text_options_finalize
;
object_class
->
set_property
=
gimp_text_options_set_property
;
object_class
->
get_property
=
gimp_text_options_get_property
;
...
...
@@ -206,6 +210,20 @@ gimp_text_options_init (GimpTextOptions *options)
options
->
size_entry
=
NULL
;
}
static
void
gimp_text_options_finalize
(
GObject
*
object
)
{
GimpTextOptions
*
options
=
GIMP_TEXT_OPTIONS
(
object
);
if
(
options
->
language
)
{
g_free
(
options
->
language
);
options
->
language
=
NULL
;
}
G_OBJECT_CLASS
(
parent_class
)
->
finalize
(
object
);
}
static
void
gimp_text_options_get_property
(
GObject
*
object
,
guint
property_id
,
...
...
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