<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix segfault/assert if LinkDestination is constructed with invalid input string"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99357#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fix segfault/assert if LinkDestination is constructed with invalid input string"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=99357">bug 99357</a>
              from <span class="vcard"><a class="email" href="mailto:cullmann@kde.org" title="Christoph Cullmann <cullmann@kde.org>"> <span class="fn">Christoph Cullmann</span></a>
</span></b>
        <pre>I do that e.g. to handle table of contents, just like okular does it in
generator_pdf.cpp, too:

     if (!e.attribute(QStringLiteral("Destination")).isNull())
        {
            Okular::DocumentViewport vp;
            fillViewportFromLinkDestination( vp,
Poppler::LinkDestination(e.attribute(QStringLiteral("Destination"))) );
            item.setAttribute( QStringLiteral("Viewport"), vp.toString() );
        }

=> if you have any broken entry there, that will segfault, which IMHO is not
nice.

Now you can argue that the toc QDomDocument should contain only wellformed
things, still I see no real point in not avoiding the doom in the constructor
as that check is really cheap.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>