text: font: pango: fix memory allocation

Whoops, we were checking the wrong variable. Fix the OOM check to
correctly catch the right errors.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-07-31 16:59:36 +02:00
parent b04410f1a9
commit b074966af1

View File

@ -173,7 +173,7 @@ static int get_glyph(struct face *face, struct kmscon_glyph **out,
}
glyph->buf.data = malloc(glyph->buf.height * glyph->buf.stride);
if (!bitmap.buffer) {
if (!glyph->buf.data) {
log_error("cannot allocate bitmap memory");
ret = -ENOMEM;
goto out_glyph;