Log in or register to post comments

QCARutils - called object pointer is null

November 22, 2013 - 1:37am #1

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?:

QCARutils - called object pointer is null

November 22, 2013 - 4:10am #4

no worries - thanks for pointing out

QCARutils - called object pointer is null

November 22, 2013 - 3:42am #3

THX! Sorry for the duplicate question!

QCARutils - called object pointer is null

November 22, 2013 - 3:37am #2
Log in or register to post comments