From b39a1674b0681ee0fb304f445fd6a05f4d47cffa Mon Sep 17 00:00:00 2001 From: Bob Jamison Date: Tue, 13 Mar 2007 20:55:13 +0000 Subject: Add null checks. (bzr r2634) --- src/extension/internal/odf.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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))) -- cgit v1.2.3