Fix possible null pointer dereference
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 11 Aug 2016 20:11:38 +0000 (22:11 +0200)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 11 Aug 2016 20:11:38 +0000 (22:11 +0200)
src/output/cairo.c

index 1a8c78c69fe0d0062dcb379aa0f4d758c2ebb48c..c7188af0b60a1ab24cc15f30296ee8916d442495 100644 (file)
@@ -1078,7 +1078,8 @@ xr_layout_cell_text (struct xr_driver *xr,
             {
               if (brk && clip[H][0] != clip[H][1])
                 best = bottom;
-              *brk = bottom;
+              if (brk)
+                *brk = bottom;
             }
           else
             break;