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
99
S
21
G
12
Posts: 3,259
Reputation: 16,894

Post » Sat Sep 26, 2009 10:28 pm

It returns NULL. So obviously you cannot then dereference it.
Scirra Founder
B
387
S
229
G
87
Posts: 24,245
Reputation: 192,050


Return to Construct engineering

Who is online

Users browsing this forum: No registered users and 0 guests