diff options
author | David Robillard <d@drobilla.net> | 2020-12-15 21:58:55 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-15 21:59:18 +0100 |
commit | 06dbd430d41e964b1571906065cfe346e79f4f9e (patch) | |
tree | f981f3763ba8fd56c96f0eab61f18d94900e3ed3 | |
parent | 6303ef3c781e4a47e9e281e26ac0bddfb1a07a65 (diff) | |
download | suil-06dbd430d41e964b1571906065cfe346e79f4f9e.tar.gz suil-06dbd430d41e964b1571906065cfe346e79f4f9e.tar.bz2 suil-06dbd430d41e964b1571906065cfe346e79f4f9e.zip |
Avoid checking for null before deleting
-rw-r--r-- | src/gtk2_in_qt5.cpp | 4 | ||||
-rw-r--r-- | src/x11_in_qt5.cpp | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/gtk2_in_qt5.cpp b/src/gtk2_in_qt5.cpp index eacf677..daf4eac 100644 --- a/src/gtk2_in_qt5.cpp +++ b/src/gtk2_in_qt5.cpp @@ -74,9 +74,7 @@ wrapper_free(SuilWrapper* wrapper) gtk_widget_destroy(impl->plug); } - if (impl->host_widget) { - delete impl->host_widget; - } + delete impl->host_widget; free(impl); } diff --git a/src/x11_in_qt5.cpp b/src/x11_in_qt5.cpp index d5fd858..4b5d42d 100644 --- a/src/x11_in_qt5.cpp +++ b/src/x11_in_qt5.cpp @@ -145,9 +145,7 @@ wrapper_free(SuilWrapper* wrapper) { SuilX11InQt5Wrapper* impl = (SuilX11InQt5Wrapper*)wrapper->impl; - if (impl->host_widget) { - delete impl->host_widget; - } + delete impl->host_widget; free(impl); } |