From 7e0fda9d3090574eeed02370e3ae6826cd14fdd2 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Fri, 28 Oct 2011 22:03:11 +0200 Subject: fix potential null pointer deref (bzr r10701) --- src/libnrtype/TextWrapper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libnrtype/TextWrapper.cpp b/src/libnrtype/TextWrapper.cpp index 3de85fcdf..63af17f2e 100644 --- a/src/libnrtype/TextWrapper.cpp +++ b/src/libnrtype/TextWrapper.cpp @@ -206,8 +206,8 @@ void text_wrapper::DoLayout(void) GSList *curR = pLine->runs; // get ready to iterate over the runs of this line while ( curR ) { PangoLayoutRun *pRun = (PangoLayoutRun*)curR->data; - int prOffset = pRun->item->offset; // start of the run in the line if ( pRun ) { + int prOffset = pRun->item->offset; // start of the run in the line // a run has uniform font/directionality/etc... int o_g_l = glyph_length; // save the index of the first glyph we'll add for (int i = 0; i < pRun->glyphs->num_glyphs; i++) { // add glyph sequentially, reading them from the run -- cgit v1.2.3