[Kst] [Bug 124444] Crash when click on where deleted object used to be
George Staikos
staikos at kde.org
Wed Mar 29 01:52:29 CEST 2006
Looks fine. I'm testing it here and will commit when I'm done.
On Tuesday 28 March 2006 17:00, you wrote:
> That said, I agree that the code at line 336 looks wrong.
>
> If the "if" statement was written as intended then the _pressTarget = 0L
> inside it is unnecessary. What about the following:
>
> if (_mode != LayoutMode) {
> _pressTarget = 0L;
> return false;
> }
>
> _pressTarget = findDeepestChild(pos, false);
> if (_pressTarget) {
> KstViewObjectPtr p = _pressTarget;
> while (p->_parent && p->_parent->_container) {
> p = p->_parent;
> }
> if (p->_parent && !p->_parent->_container) {
> _pressTarget = p->_parent;
> }
> }
>
> if (!_pressTarget) {
> return false;
> }
>
> On March 28, 2006 1:33 pm, George Staikos wrote:
> > On Tuesday 28 March 2006 15:29, Andrew Walker wrote:
> > > It crashes in KstTopLevelView::handlePress(const QPoint& pos, bool
> > > shift) because _focusOn is true but _pressTarget is NULL
> >
> > On line 336 I see this:
> > if (_mode != LayoutMode && !_pressTarget) {
> > _pressTarget = 0L;
> > return false;
> > }
> >
> > I think that might actually be the bug. I think it should be
> > "|| !_pressTarget" because it does all kinds of checking for a null
> > target but then completely ignores it without this logic.
> >
> > ------------------------------------------------------------------------
> > r439385 | rchern | 2005-07-27 21:01:57 -0400 (Wed, 27 Jul 2005) | 3 lines
> >
> > Very preliminary skeleton of graphics view objects UI
> > - most features do not work/are buggy
> > ------------------------------------------------------------------------
> >
> > I'm still baffled as to why I don't see this, but I think I see how it
> > crashes. Do you agree that it should be || !_pressTarget?
--
George Staikos
KDE Developer http://www.kde.org/
Staikos Computing Services Inc. http://www.staikos.net/
More information about the Kst
mailing list