From 10aea461cceadb843e5a76930dcfb531b3d39a95 Mon Sep 17 00:00:00 2001 From: Rudolf Cornelissen Date: Thu, 20 Oct 2005 09:10:32 +0000 Subject: [PATCH] oops. Now only uninstalling INT handler if it was previously installed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14441 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/graphics/nvidia/driver.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/add-ons/kernel/drivers/graphics/nvidia/driver.c b/src/add-ons/kernel/drivers/graphics/nvidia/driver.c index 78116efb81..c67f8da03e 100644 --- a/src/add-ons/kernel/drivers/graphics/nvidia/driver.c +++ b/src/add-ons/kernel/drivers/graphics/nvidia/driver.c @@ -1101,13 +1101,13 @@ free_hook (void* dev) { /* disable and clear any pending interrupts */ disable_vbi(regs); - - /* remove interrupt handler */ - remove_io_interrupt_handler(di->pcii.u.h0.interrupt_line, nv_interrupt, di); - /* delete the semaphores, ignoring any errors ('cause the owning team may have died on us) */ if (si->ps.int_assigned) { + /* remove interrupt handler */ + remove_io_interrupt_handler(di->pcii.u.h0.interrupt_line, nv_interrupt, di); + + /* delete the semaphores, ignoring any errors ('cause the owning team may have died on us) */ delete_sem(si->vblank); si->vblank = -1; }