KDE/kdevplatform/sublime

Vladimir Prus ghost at cs.msu.su
Sat Jun 14 11:14:28 UTC 2008


On Saturday 14 June 2008 14:53:58 Hamish Rodda wrote:
> SVN commit 820447 by rodda:
> 
> Fix crash I encountered earlier
> 
> 
>  M  +5 -0      mainwindow_p.cpp  
> 
> 
> --- trunk/KDE/kdevplatform/sublime/mainwindow_p.cpp #820446:820447
> @@ -308,6 +308,11 @@
>      kDebug() << "splitter " << splitter << " container " << splitter->widget(0);
>      //find the container for the view and remove the widget
>      Container *container = qobject_cast<Container*>(splitter->widget(0));
> +    if (!container) {
> +        kWarning() << "Splitter does not have a left widget!";
> +        return;
> +    }

Uh-oh. Why are we trying to get at container that does not exist? It does not seem
to me that kWarning is a satisfactory solution for what seems like broken
invariants and/or broken precondition.

How does one reproduce this crash?

- Volodya




More information about the KDevelop-devel mailing list