mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
Avoid NPE when handling diagrams in pptx
Fixes https://issues.oss-fuzz.com/issues/484589690
This commit is contained in:
parent
e9e9612a1f
commit
9d9865c9b8
@ -148,8 +148,12 @@ public class XSLFDiagram extends XSLFGraphicFrame {
|
|||||||
shapeCt.setSpPr(msShapeCt.getSpPr());
|
shapeCt.setSpPr(msShapeCt.getSpPr());
|
||||||
|
|
||||||
CTShapeNonVisual nonVisualCt = shapeCt.addNewNvSpPr();
|
CTShapeNonVisual nonVisualCt = shapeCt.addNewNvSpPr();
|
||||||
nonVisualCt.setCNvPr(msShapeCt.getNvSpPr().getCNvPr());
|
com.microsoft.schemas.office.drawing.x2008.diagram.CTShapeNonVisual nvSpPr = msShapeCt.getNvSpPr();
|
||||||
nonVisualCt.setCNvSpPr(msShapeCt.getNvSpPr().getCNvSpPr());
|
if (nvSpPr == null) {
|
||||||
|
nvSpPr = msShapeCt.addNewNvSpPr();
|
||||||
|
}
|
||||||
|
nonVisualCt.setCNvPr(nvSpPr.getCNvPr());
|
||||||
|
nonVisualCt.setCNvSpPr(nvSpPr.getCNvSpPr());
|
||||||
nonVisualCt.setNvPr(CTApplicationNonVisualDrawingProps.Factory.newInstance());
|
nonVisualCt.setNvPr(CTApplicationNonVisualDrawingProps.Factory.newInstance());
|
||||||
shapeCt.setNvSpPr(nonVisualCt);
|
shapeCt.setNvSpPr(nonVisualCt);
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user