diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-31 19:48:14 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-03-31 19:48:14 -0500 |
commit | c7e94c427aa0d4e44e1a1ba779935953efa0df6d (patch) | |
tree | 6e4e561d26d193e0c616ed73cbec8913910f11b5 | |
parent | 667932498f664c6f602fe5d0515434026cc0770d (diff) | |
download | tdelibs-c7e94c427aa0d4e44e1a1ba779935953efa0df6d.tar.gz tdelibs-c7e94c427aa0d4e44e1a1ba779935953efa0df6d.zip |
Fix a potential crash
-rw-r--r-- | tdecore/tdehardwaredevices.cpp | 4 |
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); |