Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Thompson <quornian@googlemail.com>2008-07-16 16:56:23 +0400
committerIan Thompson <quornian@googlemail.com>2008-07-16 16:56:23 +0400
commit062643eefd81e41bc4f396edb75ac3b21b0f17dc (patch)
treeead082112f5c60ed75f7081be901f7ca30622695 /release
parentcc89221a2461e289edb380922d9f53566dc2a9eb (diff)
Fixed error when scripts were run without a visible Text to work on.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/textplugin_imports.py3
-rw-r--r--release/scripts/textplugin_membersuggest.py3
-rw-r--r--release/scripts/textplugin_suggest.py3
3 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/textplugin_imports.py b/release/scripts/textplugin_imports.py
index 978efeb2c49..2186adf5c73 100644
--- a/release/scripts/textplugin_imports.py
+++ b/release/scripts/textplugin_imports.py
@@ -18,6 +18,9 @@ except ImportError:
def main():
txt = bpy.data.texts.active
+ if not txt:
+ return
+
line, c = current_line(txt)
# Check we are in a normal context
diff --git a/release/scripts/textplugin_membersuggest.py b/release/scripts/textplugin_membersuggest.py
index 61c803e9c0c..d175549a7bd 100644
--- a/release/scripts/textplugin_membersuggest.py
+++ b/release/scripts/textplugin_membersuggest.py
@@ -18,6 +18,9 @@ except ImportError:
def main():
txt = bpy.data.texts.active
+ if not txt:
+ return
+
(line, c) = current_line(txt)
# Check we are in a normal context
diff --git a/release/scripts/textplugin_suggest.py b/release/scripts/textplugin_suggest.py
index 3014aaf381f..20e248017af 100644
--- a/release/scripts/textplugin_suggest.py
+++ b/release/scripts/textplugin_suggest.py
@@ -33,6 +33,9 @@ def check_imports(line, c):
def main():
txt = bpy.data.texts.active
+ if not txt:
+ return
+
(line, c) = current_line(txt)
# Check we are in a normal context