Fix hang on opening addons tab, having a .py file without bl_addon_info
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 4 Aug 2010 15:52:59 +0000 (15:52 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Wed, 4 Aug 2010 15:52:59 +0000 (15:52 +0000)
would go into eternal loop.

release/scripts/ui/space_userpref.py

index 9d20bc70657b1813bf0456509ffa5f26b09d9b4c..9cdf6ca2809d7cd61974c05ac24bb328de5486d5 100644 (file)
@@ -853,6 +853,8 @@ class USERPREF_PT_addons(bpy.types.Panel):
                     l = ""
                     while not l.startswith("bl_addon_info"):
                         l = line_iter.readline()
+                        if len(l) == 0:
+                            break
                     while l.rstrip():
                         lines.append(l)
                         l = line_iter.readline()