From a089fcc3d5af11fd6d1c8c20341853ef67a2323e Mon Sep 17 00:00:00 2001 From: Dan Dennedy Date: Sat, 13 Apr 2024 09:34:48 -0700 Subject: [PATCH] fix #873 remove some unnecessary null pointer checks --- src/modules/qt/kdenlivetitle_wrapper.cpp | 3 +-- src/modules/rubberband/filter_rbpitch.cpp | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/modules/qt/kdenlivetitle_wrapper.cpp b/src/modules/qt/kdenlivetitle_wrapper.cpp index 50e3f4f6f..c253edadd 100644 --- a/src/modules/qt/kdenlivetitle_wrapper.cpp +++ b/src/modules/qt/kdenlivetitle_wrapper.cpp @@ -300,8 +300,7 @@ QTransform stringToTransform(const QString &s) static void qscene_delete(void *data) { QGraphicsScene *scene = (QGraphicsScene *) data; - if (scene) - delete scene; + delete scene; scene = NULL; } diff --git a/src/modules/rubberband/filter_rbpitch.cpp b/src/modules/rubberband/filter_rbpitch.cpp index e9cefe427..03ef7e620 100644 --- a/src/modules/rubberband/filter_rbpitch.cpp +++ b/src/modules/rubberband/filter_rbpitch.cpp @@ -1,6 +1,6 @@ /* * filter_rbpitch.c -- adjust audio pitch - * Copyright (C) 2020 Meltytech, LLC + * Copyright (C) 2020-2024 Meltytech, LLC * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -295,11 +295,7 @@ mlt_filter filter_rbpitch_init(mlt_profile profile, mlt_service_type type, const if (filter) { mlt_filter_close(filter); } - - if (pdata) { - free(pdata); - } - + free(pdata); filter = NULL; } return filter;