summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cdrom.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 72d8e4d41..3467f49d7 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -921,6 +921,7 @@ pkgUdevCdromDevices::Scan() /*{{{*/
pkgUdevCdromDevices::~pkgUdevCdromDevices() /*{{{*/
{
- dlclose(libudev_handle);
+ if (libudev_handle != NULL)
+ dlclose(libudev_handle);
}
/*}}}*/