mirror of
https://review.haiku-os.org/haiku
synced 2025-02-12 08:39:18 +01:00
the ServerPicture calls those itself from SetOwner(). Since there are asserts in ServerPicture about fOwner, it was easiest to fix the code by using *only* SetOwner() from within ServerApp to add or remove pictures. * SetOwner() was broken, since it called a method which potentially removed the last reference and then still accessed memory of the now free'd ServerPicture instance. The easiest fix is to just increase the reference count temporarily. * SetOwner() wrongly returned false when the new owner was NULL. * NestPicture() should simply add it's own reference. There are two places where it is called, and only one of them added the extra reference. The other one only acquired the implicit reference that the ServerApp owns, but pictures that remove nested children remove a reference from them. This could leave stale pointers around of course. * Added more asserts about fOwner. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38484 a95241bf-73f2-0310-859d-f6bbb57e9c96