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
94
S
21
G
12
Posts: 3,250
Reputation: 16,710

Post » Sat Sep 26, 2009 10:28 pm

It returns NULL. So obviously you cannot then dereference it.
Scirra Founder
B
367
S
217
G
82
Posts: 23,262
Reputation: 183,679


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests