gedit-plugins r381 - trunk/plugins/drawspaces



Author: pborelli
Date: Sun Oct 12 18:37:13 2008
New Revision: 381
URL: http://svn.gnome.org/viewvc/gedit-plugins?rev=381&view=rev

Log:
fix small warning on deactivate


Modified:
   trunk/plugins/drawspaces/drawspaces.py

Modified: trunk/plugins/drawspaces/drawspaces.py
==============================================================================
--- trunk/plugins/drawspaces/drawspaces.py	(original)
+++ trunk/plugins/drawspaces/drawspaces.py	Sun Oct 12 18:37:13 2008
@@ -60,7 +60,8 @@
         self._handler_id = view.connect('event-after', self.on_event_after)
 
     def deactivate(self):
-        self._view.disconnect(self._handler_id)
+        if self._handler_id is not None:
+            self._view.disconnect(self._handler_id)
 
     def enable_draw_spaces(self, enable):
         if enable and self._handler_id is None:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]