From 39e5eb41babe3b661f2bcc052be2324d02b18882 Mon Sep 17 00:00:00 2001 From: ishmal Date: Tue, 13 Mar 2007 20:55:13 +0000 Subject: [PATCH] Add null checks. --- src/extension/internal/odf.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/extension/internal/odf.cpp b/src/extension/internal/odf.cpp index 8645205f2..3ce44ee84 100644 --- a/src/extension/internal/odf.cpp +++ b/src/extension/internal/odf.cpp @@ -15,7 +15,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2006 Bob Jamison + * Copyright (C) 2006, 2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1650,8 +1650,14 @@ bool OdfOutput::processStyle(Writer &outs, SPItem *item, bool OdfOutput::processGradient(Writer &outs, SPItem *item, const Glib::ustring &id, NR::Matrix &tf) { + if (!item) + return false; + SPStyle *style = item->style; + if (!style) + return false; + //## Gradient. Look in writeStyle() below to see what info // we need to read into GradientInfo. if (!SP_IS_GRADIENT(SP_STYLE_FILL_SERVER(style))) -- 2.30.2