Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hey,

this simple patch fixes a crash while loading the document in
fdo#44442. I think the crash is related to the fact that we use an
external range in a place where the range is interpreted as database
range.

I think returning before we try to fetch the database range is the
best thing in this case.

I think it is a simple patch fixing a crash and should be pushed to 3-4.

Regards,
Markus
From 5065c9e2f00400d02681e5ac378d105d626b5ecb Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Sun, 8 Jan 2012 04:32:06 +0100
Subject: [PATCH] return early on error in ScInterpreter::GetDBParam, fdo#44442

---
 sc/source/core/tool/interpr1.cxx |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 8121344..3614896 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -6187,6 +6187,9 @@ ScDBQueryParamBase* ScInterpreter::GetDBParams( sal_Bool& rMissingField )
                 SetError( errIllegalParameter );
         }
 
+        if (nGlobalError)
+            return NULL;
+
         auto_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
 
         if (nGlobalError || !pDBRef.get())
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.