Index: wc_db_wcroot.c
===================================================================
--- wc_db_wcroot.c	(revision 1378109)
+++ wc_db_wcroot.c	(working copy)
@@ -374,6 +374,17 @@
   int wc_format = 0;
   const char *adm_relpath;
 
+  /* gg:
+     Test the db pointer if NULL: assert if that's ok or take some acction
+     (return an error)
+     For some reason kdevelop subversion module crashes here because of that
+	 */
+
+  if (db == NULL)
+    {
+      return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL, NULL);
+    }
+
   /* ### we need more logic for finding the database (if it is located
      ### outside of the wcroot) and then managing all of that within DB.
      ### for now: play quick & dirty. */
