Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
4 registered members (AndrewAMD, Quad, soulman3, Ayumi), 675 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: check for empty pointer [Re: flatron] #401657
05/23/12 06:25
05/23/12 06:25
Joined: Mar 2006
Posts: 1,993
Karlsruhe
PadMalcom Offline
Serious User
PadMalcom  Offline
Serious User

Joined: Mar 2006
Posts: 1,993
Karlsruhe
@flatron: If you use physics unregister all entities from the physX engine.

Re: check for empty pointer [Re: PadMalcom] #401866
05/25/12 12:22
05/25/12 12:22
Joined: Jan 2010
Posts: 150
iran - tehran
F
flatron Offline
Member
flatron  Offline
Member
F

Joined: Jan 2010
Posts: 150
iran - tehran
that entities are not physic entity.

Re: check for empty pointer [Re: flatron] #401903
05/25/12 18:17
05/25/12 18:17
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Then try creating a new 'safe' version of ent_purge... like this

#define safe_purge(ptr) if(ptr) if(ent_next(ptr)) ent_purge(ptr)

It STILL doesnt set the pointer to NULL after a sucessful purge,
but it prevents crashes on invald pointers.



Last edited by EvilSOB; 05/25/12 19:21. Reason: Not editied. Trust me! :b

"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: check for empty pointer [Re: EvilSOB] #401904
05/25/12 18:52
05/25/12 18:52
Joined: Apr 2007
Posts: 3,751
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,751
Canada
Plus: It won't work because the first condition asks for a NULL pointer tongue


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Re: check for empty pointer [Re: WretchedSid] #401910
05/25/12 19:28
05/25/12 19:28
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Damn I hate typos...


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: check for empty pointer [Re: EvilSOB] #401913
05/25/12 20:28
05/25/12 20:28
Joined: Mar 2012
Posts: 927
cyberspace
W
Wjbender Offline
User
Wjbender  Offline
User
W

Joined: Mar 2012
Posts: 927
cyberspace
@flatron could you show how you make the comparison against null
or perhaps some code that produces your problem


Compulsive compiler
Re: check for empty pointer [Re: Wjbender] #401916
05/25/12 20:40
05/25/12 20:40
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
I could be wrong, I dont think he CAN compare against NULL.

When you do a level load, all the entities get flushed out, but any
manually-created pointers YOU have made dont get reset to null.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1