Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-53881

sphere.cpp constructRitterSphere not valid if points are empty

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.7
    • 5.7.0 RC, 5.7.0
    • Qt3D
    • None
    • OSX 10.11.5, latest xcode, qt.5.7.0rc from git
    • 9271067145dc4a2b03a2747327144509188a756f

    Description

      get assert failures in the Sphere::constructRitterSphere call if points is empty. Following patch fixes that issue. Not sure why points are empty, but I'm having issues because my rendering of the scene takes place after the Qt3DWindow viewer is constructed (no way around that in terms of the flow of things in my code).

      diff --git a/src/render/frontend/sphere.cpp b/src/render/frontend/sphere.cpp
      index 4ff17ea..d5d6ef8 100644
      --- a/src/render/frontend/sphere.cpp
      +++ b/src/render/frontend/sphere.cpp
      @@ -163,7 +163,9 @@ Sphere Sphere::fromPoints(const QVector<QVector3D> &points)
       
       void Sphere::initializeFromPoints(const QVector<QVector3D> &points)
       {
      -    constructRitterSphere(*this, points);
      +    if(points.size() > 0) {
      +      constructRitterSphere(*this, points);
      +    }
       }
       
       void Sphere::expandToContain(const QVector3D &p)
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            seanharmer Sean Harmer
            rcoreilly Randall O'Reilly
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes