summaryrefslogtreecommitdiffstats
path: root/src/libnrtype
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2011-10-28 20:03:11 +0000
committerJohan Engelen <goejendaagh@zonnet.nl>2011-10-28 20:03:11 +0000
commit7e0fda9d3090574eeed02370e3ae6826cd14fdd2 (patch)
tree380e6a53d0c6f6a20de410ad771d98ad2668cef6 /src/libnrtype
parentadd a cppcheck suppression for memleak that is not a memleak (diff)
downloadinkscape-7e0fda9d3090574eeed02370e3ae6826cd14fdd2.tar.gz
inkscape-7e0fda9d3090574eeed02370e3ae6826cd14fdd2.zip
fix potential null pointer deref
(bzr r10701)
Diffstat (limited to 'src/libnrtype')
-rw-r--r--src/libnrtype/TextWrapper.cpp2
1 files changed, 1 insertions, 1 deletions
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