1
0
forked from mirrors/0ad

Fixed a few memory leaks as well as the CPlayer/SColour crash-on-exit bug

This was SVN commit r1756.
This commit is contained in:
olsner
2005-01-23 01:36:47 +00:00
parent 113d89e148
commit bcf89936c1
11 changed files with 142 additions and 34 deletions
+13
View File
@@ -85,3 +85,16 @@ JSBool SColour::Construct( JSContext* cx, JSObject* obj, unsigned int argc, jsva
return( JS_TRUE );
}
// (Simon) Added this to prevent a deep copy, which evidently makes direct
// copies of the heap allocated objects within CJSObject, which eventually
// goes boom
SColour &SColour::operator = (const SColour &o)
{
r=o.r;
g=o.g;
b=o.b;
a=o.a;
return *this;
}