[umbrello] [Bug 445119] Issues with code ignoring and possibly dereferencing nullptr

"Robert Hairgrove" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=445119

--- Comment #2 from Robert Hairgrove <[email protected]> ---
(In reply to Ralf Habacker from comment #1)
> When I started working on Umbrello, there were many crashes because various
> lists contained undefined pointers. This has been massively mitigated by
> using QPointer, so that there are zero pointers left, which are checked and
> ignored when accessing the lists. Why these null pointers are contained
> there has already been investigated and fixed in some cases in the past,
> when the cause was identifiable.  One reason for this is probably the lack
> of referential integrity of the objects involved. Objects are destroyed
> although they are still registered in any lists.

I wonder if it would help to have each object containing a UMLObjectList member
to connect the "destroyed()" signal, emitted whenever a QObject is about to be
destroyed, to some cleanup function which would remove the QPointer from its
list? This could also be a slot added to the UMLObjectList class (which
otherwise doesn't seem to be doing much of anything on its own) instead of
having the object containing the list as a member be responsible for its own
cleanup?

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.