[sushi] font-loader: don't dereference NULL errors
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sushi] font-loader: don't dereference NULL errors
- Date: Sun, 29 Apr 2012 22:07:44 +0000 (UTC)
commit 4dda0a129f8636ff650f3ffc7c534e0ee8f65358
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sun Apr 29 18:00:31 2012 -0400
font-loader: don't dereference NULL errors
src/libsushi/sushi-font-loader.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libsushi/sushi-font-loader.c b/src/libsushi/sushi-font-loader.c
index 45481c6..d599a57 100644
--- a/src/libsushi/sushi-font-loader.c
+++ b/src/libsushi/sushi-font-loader.c
@@ -119,7 +119,7 @@ font_load_job_do_load (FontLoadJob *job,
g_file_load_contents (job->file, NULL,
&contents, &length, NULL, error);
- if (*error == NULL) {
+ if ((error != NULL) && (*error == NULL)) {
job->face_contents = contents;
job->face_length = length;
}
@@ -160,7 +160,7 @@ sushi_new_ft_face_from_uri (FT_Library library,
job = font_load_job_new (library, uri, NULL, NULL);
font_load_job_do_load (job, error);
- if (*error != NULL) {
+ if ((error != NULL) && (*error != NULL)) {
g_object_unref (job);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]