Changing order how ccnx-related stuff is destroyed
diff --git a/model/sync-ccnx-wrapper.cc b/model/sync-ccnx-wrapper.cc
index baf787c..58bacc4 100644
--- a/model/sync-ccnx-wrapper.cc
+++ b/model/sync-ccnx-wrapper.cc
@@ -55,9 +55,9 @@
   
   m_thread.join ();
   ccn_disconnect (m_handle);
-  ccn_destroy (&m_handle);
   ccn_charbuf_destroy (&m_keyLoactor);
   ccn_keystore_destroy (&m_keyStore);
+  ccn_destroy (&m_handle);
 }
 
 /// @cond include_hidden