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
libgxps
Commits
d32d6026
Commit
d32d6026
authored
Feb 03, 2021
by
Qiuhao Li
Committed by
Ignacio Casal Quinteiro
Feb 04, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: check whether converter->surface is NULL
Fixes
#3
parent
6bf9be28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
tools/gxps-print-converter.c
tools/gxps-print-converter.c
+11
-8
No files found.
tools/gxps-print-converter.c
View file @
d32d6026
...
...
@@ -210,14 +210,17 @@ static void
gxps_converter_print_converter_end_document
(
GXPSConverter
*
converter
)
{
GXPSPrintConverter
*
print_converter
=
GXPS_PRINT_CONVERTER
(
converter
);
cairo_status_t
status
;
cairo_surface_finish
(
converter
->
surface
);
status
=
cairo_surface_status
(
converter
->
surface
);
if
(
status
)
g_printerr
(
"Cairo error: %s
\n
"
,
cairo_status_to_string
(
status
));
cairo_surface_destroy
(
converter
->
surface
);
converter
->
surface
=
NULL
;
if
(
converter
->
surface
)
{
cairo_status_t
status
;
cairo_surface_finish
(
converter
->
surface
);
status
=
cairo_surface_status
(
converter
->
surface
);
if
(
status
)
g_printerr
(
"Cairo error: %s
\n
"
,
cairo_status_to_string
(
status
));
cairo_surface_destroy
(
converter
->
surface
);
converter
->
surface
=
NULL
;
}
g_free
(
print_converter
->
filename
);
print_converter
->
filename
=
NULL
;
...
...
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