diff -Naur ./sc.orig/device-tmpl.c ./sc.new/device-tmpl.c
--- ./sc.orig/device-tmpl.c 2013-04-14 10:09:01.000000000 +0200
+++ ./sc.new/device-tmpl.c 2013-04-18 18:03:28.000000000 +0200
@@ -93,8 +93,6 @@
SCDEVICE::~SCDEVICE()
{
#ifndef SASC
- DetachAllReceivers();
- Cancel(3);
EarlyShutdown();
#endif
if(fd_ca>=0) close(fd_ca);
@@ -125,9 +123,19 @@
void SCDEVICE::EarlyShutdown(void)
{
+ DetachAllReceivers();
+ Cancel(3);
SetCamSlot(0);
- delete cam; cam=0;
- delete hwciadapter; hwciadapter=0;
+ if (cam)
+ {
+ delete cam;
+ cam=0;
+ }
+ if (hwciadapter)
+ {
+ delete hwciadapter;
+ hwciadapter=0;
+ }
}
#ifndef OWN_FULLTS