From 36c12db68a3caddee0c3385a1838222e9ab596aa Mon Sep 17 00:00:00 2001 From: brad Date: Thu, 17 Jun 2004 12:03:55 +0000 Subject: A hack workaround to prevent the launcher segfaulting after adding/removing a launcher tab. This only appears to happen if you insert/remove removable media that contains apps that would insert a tab (like games perhaps). It has a deeper root cause but for the moment this works around it. --- (limited to 'core/launcher') diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 779fe54..87a54bf 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -340,14 +340,29 @@ void LauncherTabWidget::setProgressStyle() } } +/* + * FIXME + * The following NULL check is triggered by inserting, then removing a tab on the fly + * as you would if you had removable media (which I do). Without this check + * the first app launched after a tab removal causes qpe to Segfault. + * This obviously has a more sinister cause, but this works around it with no + * obvious adverse effects. Please FIXME + * bkc - 17/6/2004 + * + */ + void LauncherTabWidget::setBusy(bool on) { if ( on ) currentView()->setBusy(TRUE); else { for ( int i = 0; i < categoryBar->count(); i++ ) { - LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; - view->setBusy( FALSE ); + if (categoryBar->tab(i)) { + LauncherView *view = ((LauncherTab *)categoryBar->tab(i))->view; + view->setBusy( FALSE ); + } else { + odebug << "Averting Disaster with tab " << i << " == NULL! " << oendl; + } } } } -- cgit v0.9.0.2