From 7a4813cedd50a6fb29c7493f157b28f2719812ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Fri, 11 Feb 2022 12:40:21 +0100 Subject: [PATCH] Wayland: Remove unnecessary NULL checks It is fine to pass NULL to free. (cherry picked from commit 4a68926bfd999c835009429e6452b2c271252959) --- src/wl_init.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/wl_init.c b/src/wl_init.c index 685cc650..7459953a 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -1294,10 +1294,8 @@ void _glfwPlatformTerminate(void) if (_glfw.wl.cursorTimerfd >= 0) close(_glfw.wl.cursorTimerfd); - if (_glfw.wl.clipboardString) - free(_glfw.wl.clipboardString); - if (_glfw.wl.clipboardSendString) - free(_glfw.wl.clipboardSendString); + free(_glfw.wl.clipboardString); + free(_glfw.wl.clipboardSendString); } const char* _glfwPlatformGetVersionString(void)