From 6f9bb7c72fa70693a43f61930e20a44fc6829f25 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 20 Nov 2016 22:56:33 +0100 Subject: [PATCH] CUpnpBrowserGui: simplify hintbox calls Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/c47d26637b4d93a72c42152980a46306c87fa9cc Author: Thilo Graf Date: 2016-11-20 (Sun, 20 Nov 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/upnpbrowser.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/upnpbrowser.cpp b/src/gui/upnpbrowser.cpp index 3d80069a1..59221c059 100644 --- a/src/gui/upnpbrowser.cpp +++ b/src/gui/upnpbrowser.cpp @@ -245,19 +245,19 @@ bool CUpnpBrowserGui::discoverDevices() if (!m_devices.empty()) return true; - CHintBox *scanBox = new CHintBox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_UPNPBROWSER_SCANNING)); // UTF-8 - scanBox->paint(); + CHintBox hintbox(LOCALE_MESSAGEBOX_INFO, g_Locale->getText(LOCALE_UPNPBROWSER_SCANNING)); // UTF-8 + hintbox.paint(); try { m_devices = m_socket->Discover("urn:schemas-upnp-org:service:ContentDirectory:1"); } catch (std::runtime_error error) { - delete scanBox; + hintbox.hide(); DisplayErrorMessage(error.what()); return false; } - delete scanBox; + hintbox.hide(); if (m_devices.empty()) { DisplayInfoMessage(g_Locale->getText(LOCALE_UPNPBROWSER_NOSERVERS));