[Bug 166824] Plasma Panel Crashes when adding widgit

Mario Oschwald mario.oschwald at hpi.uni-potsdam.de
Thu Jul 17 21:10:46 CEST 2008


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=166824         




------- Additional Comments From mario.oschwald hpi uni-potsdam de  2008-07-17 21:10 -------
very frustrating for newbies, when the boss checks in the fix, just when I had my almost identical patch ready ;-)

Anyway - your patch introduces a crash by leaving the containment as null pointer. You trigger it by clicking the Add Widget Button after the panel is removed. 

Two solutions seem possible:

-deactivate the Add Widget Button (you can then still drag an applet to another containment)
-destroy the AppletBrowser completely (This is what I did even though it is kinda hackish, because only the AppletBrowserWidget keeps a pointer to the containment and I had to assume that destroying its parent would do the trick, this wouldn't work when that widget is embedded deeper or elsewhere)

I like the 2nd approach more because deactivating the button would mean finding
all the paths, where that widget is reused with another containment and activating the button then again.


More information about the Panel-devel mailing list