what happens if there are 0 instnces and u GetObjPar1stInst

Forum for plugin, effect and behavior programmers. Please use the Help & Support forum for help using Construct.

Post » Sat Sep 26, 2009 9:50 pm

what happens if there are 0 instances and you GetObjParamFirstInstance, and store that to a CRunObject*?

is the pointer invalid?
if not, what happens when you try to manipulate that phantom object?
is it safe to check ->pType?
Spriter Dev
B
101
S
22
G
12
Posts: 3,274
Reputation: 17,079

Post » Sat Sep 26, 2009 10:28 pm

It returns NULL. So obviously you cannot then dereference it.
Scirra Founder
B
403
S
238
G
89
Posts: 24,654
Reputation: 196,145


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 1 guest