"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

QCARutils - called object pointer is null

Vuforia SDK Version: 2-6-6 - Description with steps to reproduce:

- (QCAR::ImageTarget *) findImageTarget:(const char *) name{    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();    QCAR::ImageTracker* imageTracker = (QCAR::ImageTracker*)    trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER);        if (imageTracker != nil || currentDataSet == nil)    {        for(int i=0; i<currentDataSet->getNumTrackables(); i++)        {            if(currentDataSet->getTrackable(i)->getType()==QCAR::Trackable::IMAGE_TARGET)            {                if(!strcmp(currentDataSet->getTrackable(i)->getName(),name))                    return reinterpret_cast<QCAR::ImageTarget*>(currentDataSet->getTrackable(i));            }        }    }    return NULL;}

fix hint:

if (imageTracker != nil && currentDataSet != nil)

or

if (imageTracker == nil && currentDataSet != nil)

I don't know the enter condition to enter the "if", but we have to make sure currentDataSet is not null

 

- Development OS (Mac OS X, Windows, Linux): all - Mobile OS and Version: all - Mobile Device Manufacturer and Model name: all - Do the Vuforia Sample Applications show the same behavior?: