| Index: src/utils/SkLua.cpp
|
| diff --git a/src/utils/SkLua.cpp b/src/utils/SkLua.cpp
|
| index 868a8250ef3a658b91c213101ca82e58a7c7e600..56e2b41a454e5f81b22c81be895e07155aa5f56a 100644
|
| --- a/src/utils/SkLua.cpp
|
| +++ b/src/utils/SkLua.cpp
|
| @@ -1824,12 +1824,12 @@ static int lpicturerecorder_getCanvas(lua_State* L) {
|
| }
|
|
|
| static int lpicturerecorder_endRecording(lua_State* L) {
|
| - SkPicture* pic = get_obj<SkPictureRecorder>(L, 1)->endRecording();
|
| - if (nullptr == pic) {
|
| + sk_sp<SkPicture> pic = get_obj<SkPictureRecorder>(L, 1)->finishRecordingAsPicture();
|
| + if (!pic) {
|
| lua_pushnil(L);
|
| return 1;
|
| }
|
| - push_ref(L, pic)->unref();
|
| + push_ref(L, std::move(pic));
|
| return 1;
|
| }
|
|
|
|
|