[Libreoffice-commits] .: Branch 'libreoffice-3-5' - sc/source
Eike Rathke
erack at kemper.freedesktop.org
Tue Jul 3 05:14:45 PDT 2012
sc/source/core/data/documen7.cxx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit 7f2bea49b3871443608ca7639f9b601fbb9d37b6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Jul 3 02:52:55 2012 +0200
check for invalid tab number, fdo#51667
Change-Id: I9aebfafb68850130088658535f289f66d49f1741
Signed-off-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/source/core/data/documen7.cxx b/sc/source/core/data/documen7.cxx
index 0826ea6..5f6a186 100644
--- a/sc/source/core/data/documen7.cxx
+++ b/sc/source/core/data/documen7.cxx
@@ -191,7 +191,7 @@ void ScDocument::StartListeningCell( const ScAddress& rAddress,
{
OSL_ENSURE(pListener, "StartListeningCell: pListener Null");
SCTAB nTab = rAddress.Tab();
- if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
maTabs[nTab]->StartListening( rAddress, pListener );
}
@@ -200,7 +200,7 @@ void ScDocument::EndListeningCell( const ScAddress& rAddress,
{
OSL_ENSURE(pListener, "EndListeningCell: pListener Null");
SCTAB nTab = rAddress.Tab();
- if (nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
+ if (VALIDTAB(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab])
maTabs[nTab]->EndListening( rAddress, pListener );
}
More information about the Libreoffice-commits
mailing list