Index: src/manager.cpp
===================================================================
--- src/manager.cpp	(revision 427)
+++ src/manager.cpp	(working copy)
@@ -2912,6 +2916,8 @@
             if (part->dock->panes.GetCount() != 1)
                 return false;
             part = GetPanePart(part->dock->panes.Item(0)->window);
+            if (!part)
+                return false;
         }
 
 
@@ -2920,7 +2926,7 @@
         // along the edge under the toolbar, but over all other panes.
         // (this could be done much better, but somehow factoring this
         // calculation with the one at the beginning of this function)
-        if (part->dock->toolbar)
+        if (part->dock && part->dock->toolbar)
         {
             int layer = 0;
 

