chiark / gitweb /
Removed unused packages from use-list
[clg] / gtk / gtktree.lisp
index 8469b04be76ffc7a5940e75db53189d7a07a732f..bf47a0fcb8e22a08d3e0d147dd73e278ba5a3f4a 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtktree.lisp,v 1.28 2007-08-20 10:33:05 espen Exp $
+;; $Id: gtktree.lisp,v 1.30 2007-09-06 14:32:03 espen Exp $
 
 
 (in-package "GTK")
@@ -255,11 +255,12 @@ (defun %make-tree-path (path)
     location))
 
 (defun %tree-path-to-vector (location)
-  (let ((indices (%tree-path-get-indices location))
-       (depth (%tree-path-get-depth location)))
-    (if (null-pointer-p indices)
-       #()
-      (map-c-vector 'vector #'identity indices 'int depth))))
+  (unless (null-pointer-p location)
+    (let ((indices (%tree-path-get-indices location))
+         (depth (%tree-path-get-depth location)))
+      (if (null-pointer-p indices)
+         #()
+       (map-c-vector 'vector #'identity indices 'int depth)))))
 
 (defmacro %with-tree-path ((var path) &body body)
   (let* ((pointer-offset (adjust-offset (size-of 'int) 'pointer))
@@ -417,7 +418,7 @@ (defmethod tree-model-row-data ((model tree-model) row)
   (coerce
    (loop
     with iter = (ensure-tree-iter model row)
-    for index from 0 to (tree-model-n-columns model)
+    for index from 0 below (tree-model-n-columns model)
     collect (tree-model-value model iter index))
    'vector))