summaryrefslogtreecommitdiff
path: root/sysutils/k3b/patches/patch-ad
blob: 16ecbe3abc53fa02627a9b350ee7819eeda7a93a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$NetBSD: patch-ad,v 1.3 2007/05/23 12:38:23 markd Exp $

--- libk3bdevice/k3bscsicommand_netbsd.cpp.orig	2007-05-22 12:15:54.000000000 +1200
+++ libk3bdevice/k3bscsicommand_netbsd.cpp
@@ -83,9 +83,13 @@ int K3bDevice::ScsiCommand::transport( T
       break;
   }
 
-  m_device->usageLock();
+  if ( m_device ) {
+      m_device->usageLock();
+  }
   int i = ::ioctl( m_deviceHandle, SCIOCCOMMAND, &d->cmd );
-  m_device->usageUnlock();
+  if ( m_device ) {
+      m_device->usageUnlock();
+  }
 
   if( needToClose )
     m_device->close();