I started out trying to fix fdo 42778 and noticed that my initial
description of the problem was a bit to narrow. It wasn't just the pass
count that wasn't stored correctly but the breakpoints all together. In
worst case it makes the program crash. This fix, stores the values. I'm
not that experienced with C++ so could someone have a second look at
this there might very well be a "cleaner" way of writing it.
After building it with the fix, Manage Breakpoints works almost as
expected on my machine.
If you set the pass count to 1 it stops at the first 2 stops at the
second. 1 should pass one and stop the second time. I'll try to fix this
in another patch though.
--
Niklas Johansson
From b8a0ad0320fb0e36276afae1e861b5da189153b6 Mon Sep 17 00:00:00 2001
From: Niklas Johansson <sleeping.pillow@gmail.com>
Date: Mon, 28 Nov 2011 11:40:30 +0100
Subject: [PATCH] Fixes BreakPointManager
Earlier when pressing ok in the breakpoint manager the breakpoints
wasn't getting stored. The pointer address was stored but the
breakpoint object was destroyed, leaving you with random values.
---
basctl/source/basicide/bastypes.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 10310ec..058e6ba 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -288,7 +288,7 @@ void BreakPointList::transfer(BreakPointList & rList)
{
reset();
for (size_t i = 0; i < rList.size(); ++i)
- maBreakPoints.push_back( rList.at( i ) );
+ maBreakPoints.push_back( new BreakPoint(*rList.at( i )) );
rList.reset();
}
--
1.7.5.4
Context
- [Libreoffice] [PATCH] Fix for dialog Manage Breakpoints crash · Niklas Johansson
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.