diff options
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 7ae572e5685..0f93a03da6b 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -2290,3 +2290,15 @@ void WM_opengl_context_release(void *context) BLI_assert(GPU_framebuffer_active_get() == NULL); GHOST_ReleaseOpenGLContext((GHOST_ContextHandle)context); } + +void WM_generic_user_data_free(wmGenericUserData *wm_userdata) +{ + if (wm_userdata->data && wm_userdata->use_free) { + if (wm_userdata->free_fn) { + wm_userdata->free_fn(wm_userdata->data); + } + else { + MEM_freeN(wm_userdata->data); + } + } +} |