From: ishmal Date: Tue, 13 Mar 2007 20:55:13 +0000 (+0000) Subject: Add null checks. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=39e5eb41babe3b661f2bcc052be2324d02b18882;p=inkscape.git Add null checks. --- 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)))