summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehardwaredevices.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-31 19:48:14 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-03-31 19:48:14 -0500
commitc7e94c427aa0d4e44e1a1ba779935953efa0df6d (patch)
tree6e4e561d26d193e0c616ed73cbec8913910f11b5 /tdecore/tdehardwaredevices.cpp
parent667932498f664c6f602fe5d0515434026cc0770d (diff)
downloadtdelibs-c7e94c427aa0d4e44e1a1ba779935953efa0df6d.tar.gz
tdelibs-c7e94c427aa0d4e44e1a1ba779935953efa0df6d.zip
Fix a potential crash
Diffstat (limited to 'tdecore/tdehardwaredevices.cpp')
-rw-r--r--tdecore/tdehardwaredevices.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tdecore/tdehardwaredevices.cpp b/tdecore/tdehardwaredevices.cpp
index b65ea199d..b8d8d7e6f 100644
--- a/tdecore/tdehardwaredevices.cpp
+++ b/tdecore/tdehardwaredevices.cpp
@@ -930,9 +930,9 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
|| (sdevice->isDiskOfType(TDEDiskDeviceType::DVDVideo))
|| (sdevice->isDiskOfType(TDEDiskDeviceType::BDVideo))
) {
- if (disklabel == "") {
+ if (disklabel == "" && sdevice->diskLabel().isNull()) {
// Read the volume label in via volname, since udev couldn't be bothered to do this on its own
- FILE *exepipe = popen((TQString("volname %1").arg(devicenode).ascii()), "r");
+ FILE *exepipe = popen(((TQString("volname %1").arg(devicenode).ascii())), "r");
if (exepipe) {
char buffer[8092];
disklabel = fgets(buffer, sizeof(buffer), exepipe);