|
|
@@ -367,7 +367,10 @@ ElementDocument* Context::LoadMouseCursor(const String& document_path)
|
|
|
// Load the document from the stream.
|
|
|
ElementDocument* document = Factory::InstanceDocumentStream(this, stream);
|
|
|
if (document == NULL)
|
|
|
+ {
|
|
|
+ stream->RemoveReference();
|
|
|
return NULL;
|
|
|
+ }
|
|
|
|
|
|
AddMouseCursor(document);
|
|
|
|
|
|
@@ -376,6 +379,8 @@ ElementDocument* Context::LoadMouseCursor(const String& document_path)
|
|
|
document->UpdateLayout();
|
|
|
document->DispatchEvent(LOAD, Dictionary(), false);
|
|
|
|
|
|
+ stream->RemoveReference();
|
|
|
+
|
|
|
return document;
|
|
|
}
|
|
|
|