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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user