From 489bf0ee72290e4c0b4cae861672d20896a7b658 Mon Sep 17 00:00:00 2001
From: Kalle-Samuli Riihikoski <haikalle@gmail.com>
Date: Wed, 26 Jan 2011 15:04:57 +0000
Subject: [PATCH] Fix the error if no object is active.

---
 io_coat3D/coat.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/io_coat3D/coat.py b/io_coat3D/coat.py
index b2dd2a565..705c75a09 100644
--- a/io_coat3D/coat.py
+++ b/io_coat3D/coat.py
@@ -161,8 +161,9 @@ class SCENE_PT_Main(ObjectButtonsPanel,bpy.types.Panel):
                 
         row = layout.row()
         row.label(text="Texture output folder:")
-        row = layout.row()
-        row.prop(coa,"texturefolder",text="")
+        if(context.selected_objects):
+            row = layout.row()
+            row.prop(coa,"texturefolder",text="")
         row = layout.row()
         if(coat['status'] == 0):
             row.label(text="Exchange Folder: not connected")
-- 
GitLab