Log in

View Full Version : cam exception


Method
01-03-2012, 19:34
hello
caused an exception in my code but it's a little strange since I undid changes and it didnt start working again... Part of the problem is probably that i didnt have a backup

//in constructor
AxisCamera *camera;


ColorImage img(IMAQ_IMAGE_RGB);
printf("first\n");
Wait(2.0);
printf("second\n");
camera->GetImage(&img);//This is where the exception is
printf("third\n");

I've been trying different combinations that I thought would work to no avail. Any help would be great- thanks

mikets
01-03-2012, 21:04
Of course you will have an exception, your camera pointer has not been initialized.

AxisCamera *camera = AxisCamer::GetInstance("10.xx.yy.11");

Method
01-03-2012, 22:07
hehe- thanks; that used to be elsewhere in my code.. forgot to put it back in when I was moving it