문제

I recently made some minor changes within my c++-builder-project-settings to distribute a built application, however now some kind of initialisation seems to be missing.

Before I was using this (worked properly):

TPngImage *img=new TPngImage;
img->LoadFromFile(pfad);
Image1->Picture->Assign(img);

However, suddenly I get the error: access-violation... access to 0x0000000. I checked and noticed that Image1->Picture is Null. Image1 is of course a TImage-Object added per designer. I'm using embarcaderos XE2 16 c++-Builder.

Is there a setting for this or could you tell me, what I have to do? I thought of Image1->Picture=new TPicture(); already, but that is also Null...

도움이 되었습니까?

해결책

It seems that it was my settings...
Somehow I messed some setting up.

I exported the settings of a new project, copied my include-paths, overwrote the settings with the exported one and inserted the includes.

Now everything works again.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top