From 08d41f745bb7d55a786617c2453ad67c8e47e995 Mon Sep 17 00:00:00 2001
From: Adriaan de Groot <groot@kde.org>
Date: Mon, 20 Aug 2018 06:03:40 -0400
Subject: [PATCH] [partition] Remove superfluous null check

delete is specified to handle nullptr gracefully.

FIXES #1012
---
 src/modules/partition/core/DeviceList.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/modules/partition/core/DeviceList.cpp b/src/modules/partition/core/DeviceList.cpp
index ebc40a03d..4a353efb4 100644
--- a/src/modules/partition/core/DeviceList.cpp
+++ b/src/modules/partition/core/DeviceList.cpp
@@ -98,8 +98,7 @@ erase(DeviceList& l, DeviceList::iterator& it)
 {
     Device* p = *it;
     auto r = l.erase( it );
-    if (p)
-        delete p;
+    delete p;
     return r;
 }