On Wed, 2011-01-26 at 23:59 +0100, Soeren Moeller wrote:
Thanks for the answer. I now used gdb to locate the segfault, and
found it to happen when ScViewFunc called ScRangeList.front() with an
empty range list, which resulted in a segfault while trying to
retrieve the first element of the list. I have prepared the attached
patch, adding a check for empty list in ScViewFunc. (As it here
opposed to ScRangeList, was possible to check that not returning an
element was handled ok.) This removes the crash, and the sum button
seems to work fine again. Although it maybe still would make sense to
check the other uses of ScRangeList.front() for similar problems, I
will try to look into this later on, but this patch shoul at least
make this use safe.
Good work, Soeren! Very impressive. :-)
Needless to say that I've pushed your patch. I only changed the bracket
style much our coding style, but I've committed the rest as-is.
And yes, let's hunt for other similar cases. There may be more.
Kohei
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.