Summary: | Crashs while loading plugins after unloading plugins | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Sascha Cunz <mail> |
Component: | general | Assignee: | KDevelop Developers <kdevelop-devel> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | this patch seems to fix the crash for me |
Description
Sascha Cunz
2004-01-13 23:40:22 UTC
Created attachment 4154 [details]
this patch seems to fix the crash for me
Yup. Loading the FileTree plugin after having had either global VCS plugin loaded produces this crash. Sascha's patch fixes it. Subject: kdevelop CVS commit by dymo: Commited patches to fix #72582 Crashes while loading plugins after unloading plugins #72502 Kdevelop crashes when closing multiple files via Keyboard CCMAIL: 72582-done@bugs.kde.org CCMAIL: 72502-done@bugs.kde.org M +2 -0 lib/interfaces/kdevapi.cpp 1.11 M +15 -24 parts/bookmarks/bookmarks_part.cpp 1.18 --- kdevelop/parts/bookmarks/bookmarks_part.cpp #1.17:1.18 @@ -151,7 +151,7 @@ void BookmarksPart::marksChanged() { KParts::ReadOnlyPart * ro_part = *it; - KTextEditor::MarkInterface * mi = dynamic_cast<KTextEditor::MarkInterface*>( ro_part ); - - if ( ro_part && mi && partIsSane( ro_part ) ) + if ( partIsSane( ro_part ) ) + { + if ( dynamic_cast<KTextEditor::MarkInterface*>( ro_part ) ) { if ( EditorData * data = storeBookmarksForURL( ro_part ) ) @@ -165,4 +165,5 @@ void BookmarksPart::marksChanged() } } + } ++it; } @@ -505,17 +506,7 @@ KParts::ReadOnlyPart * BookmarksPart::pa bool BookmarksPart::partIsSane( KParts::ReadOnlyPart * ro_part ) { - //kdDebug(0) << "BookmarksPart::partIsSane()" << endl; - - bool isSane = true; - - isSane = isSane && partController()->parts()->contains( ro_part); - isSane = isSane && !ro_part->url().path().isEmpty(); - - if ( ! isSane ) - { - //kdDebug(0) << " ** Non-sane part encountered! ** " << endl; - } - - return isSane; + return ( ro_part != 0 ) && + partController()->parts()->contains( ro_part) && + !ro_part->url().path().isEmpty(); } --- kdevelop/lib/interfaces/kdevapi.cpp #1.10:1.11 @@ -157,4 +157,6 @@ void KDevApi::registerVersionControl( KD void KDevApi::unregisterVersionControl( KDevVersionControl *vcs ) { + if( vcs == d->m_versionControl ) + setVersionControl( 0 ); d->m_registeredVcs.remove( vcs->uid() ); } |