]> granicus.if.org Git - transmission/commitdiff
add some assertions to smoke out persept's crash too.
authorCharles Kerr <charles@transmissionbt.com>
Sun, 19 Oct 2008 22:04:47 +0000 (22:04 +0000)
committerCharles Kerr <charles@transmissionbt.com>
Sun, 19 Oct 2008 22:04:47 +0000 (22:04 +0000)
libtransmission/trevent.c

index e4d462f1ae937396aa59fbde9d452fe28e3d8782..24033aa6bcdbb472ff1d07ab2ed4eaf29f777576 100644 (file)
@@ -279,6 +279,9 @@ tr_eventClose( tr_handle * handle )
 int
 tr_amInEventThread( struct tr_handle * handle )
 {
+    assert( handle );
+    assert( handle->events );
+
     return tr_amInThread( handle->events->thread );
 }
 
@@ -365,6 +368,9 @@ tr_runInEventThread( struct tr_handle *       handle,
                      void               func( void* ),
                      void *                   user_data )
 {
+    assert( handle );
+    assert( handle->events );
+
     if( tr_amInThread( handle->events->thread ) )
     {
         (func)( user_data );