Skip to content

Commit

Permalink
free node contents
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Feb 20, 2024
1 parent f513982 commit f755e3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@ MPV_EXPORT int mpv_open_cplugin(mpv_handle *handle) {
create_plugin_ctx(handle);

mpv_node node = {0};
if (mpv_get_property(handle, MENU_DATA_PROP, MPV_FORMAT_NODE, &node) >= 0)
if (mpv_get_property(handle, MENU_DATA_PROP, MPV_FORMAT_NODE, &node) >= 0) {
update_menu(ctx, &node);
mpv_free_node_contents(&node);
}

mpv_observe_property(handle, 0, "window-id", MPV_FORMAT_INT64);
mpv_observe_property(handle, 0, MENU_DATA_PROP, MPV_FORMAT_NODE);
Expand Down

0 comments on commit f755e3a

Please sign in to comment.