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
91
S
21
G
12
Posts: 3,246
Reputation: 16,573

Post » Sat Sep 26, 2009 10:28 pm

It returns NULL. So obviously you cannot then dereference it.
Scirra Founder
B
363
S
216
G
75
Posts: 23,122
Reputation: 180,543


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests