mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Quick fix for the memory leak + docs
This commit is contained in:
@@ -1043,13 +1043,13 @@ void WebContents::EndFrameSubscription() {
|
||||
}
|
||||
|
||||
void WebContents::OnCursorChange(const content::WebCursor& cursor) {
|
||||
content::WebCursor::CursorInfo* info = new content::WebCursor::CursorInfo();
|
||||
cursor.GetCursorInfo(info);
|
||||
content::WebCursor::CursorInfo info;
|
||||
cursor.GetCursorInfo(&info);
|
||||
|
||||
if (cursor.IsCustom()) {
|
||||
Emit("cursor-changed", CursorTypeToString(info),
|
||||
gfx::Image::CreateFrom1xBitmap(info->custom_image),
|
||||
info->image_scale_factor);
|
||||
gfx::Image::CreateFrom1xBitmap(info.custom_image),
|
||||
info.image_scale_factor);
|
||||
} else {
|
||||
Emit("cursor-changed", CursorTypeToString(info));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user