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
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Sat Sep 26, 2009 10:28 pm

It returns NULL. So obviously you cannot then dereference it.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests