From 73b0cf2c466353b63ac6c28faa269020ce698701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Mon, 4 Apr 2011 15:47:16 +0000 Subject: [PATCH] Removed dead code (CID 2858). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41183 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../import_export/styled_text/StyledTextImporter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp b/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp index 71dd087cc2..e0d9b06a87 100644 --- a/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp +++ b/src/apps/icon-o-matic/import_export/styled_text/StyledTextImporter.cpp @@ -367,11 +367,9 @@ StyledTextImporter::_AddStyle(Icon *icon, text_run *run) if (!run) return EINVAL; rgb_color color = run->color; - Style* style = new (nothrow) Style(color); - if (!style) { - delete style; + Style* style = new(std::nothrow) Style(color); + if (style == NULL) return B_NO_MEMORY; - } char name[30]; sprintf(name, B_TRANSLATE("Color (#%02x%02x%02x)"), color.red, color.green, color.blue);