fix for assert

Aleix Pol aleixpol at kde.org
Tue Nov 24 01:34:50 UTC 2009


On Fri, Nov 20, 2009 at 10:28 AM, Andrea Nicotra
<nicotra.andrea at gmail.com>wrote:

> hi, I want give mi contribute to kdevelop bugfix and develop .
>
> today I found an assert on startup
>
> ASSERT: "doc" in file
> /home/andrea/workspace/svn/kdevplatform/shell/documentationcontroller.cpp,
> line 132
>
> here my fix
>
> --- svn/kdevplatform/shell/documentationcontroller.cpp   (revisione
> 1051795)
> +++svn/kdevplatform/shell/documentationcontroller.cpp   (copia locale)
> @@ -129,8 +129,10 @@
>      foreach(IPlugin* p, plugins)
>      {
>          IDocumentationProvider
> *doc=dynamic_cast<IDocumentationProvider*>(p);
> -        Q_ASSERT(doc);
> -        ret.append(doc);
> +       if(doc) {
> +               Q_ASSERT(doc);
> +               ret.append(doc);
> +       }
>      }
>      return ret;
>  }
>
>
> --
> KDevelop-devel mailing list
> KDevelop-devel at kdevelop.org
> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>
>
As milian pointed out, the fix is not correct, this assert is there to tell
the programmer this interface has been misused.
Can you provide a way to reproduce or a backtrace?

Thanks,
Aleix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20091124/09ff70c9/attachment-0001.html>


More information about the KDevelop-devel mailing list