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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-13 18:23:44 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-13 18:23:44 +0400
commit0738ae7688d19b471b7cde9cc631096a6162b3fc (patch)
tree4e83e06a400cc1b2845f6e0945bee09196b8083f /source/blender/blenkernel/intern/text.c
parent9ce2086506dcf16ecc0d5dce7851439ae8818e78 (diff)
2.5: more removal of G.main.
Diffstat (limited to 'source/blender/blenkernel/intern/text.c')
-rw-r--r--source/blender/blenkernel/intern/text.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c
index c8f5eb9b187..19bc853276a 100644
--- a/source/blender/blenkernel/intern/text.c
+++ b/source/blender/blenkernel/intern/text.c
@@ -174,10 +174,11 @@ void free_text(Text *text)
Text *add_empty_text(char *name)
{
+ Main *bmain= G.main;
Text *ta;
TextLine *tmp;
- ta= alloc_libblock(&G.main->text, ID_TXT, name);
+ ta= alloc_libblock(&bmain->text, ID_TXT, name);
ta->id.us= 1;
ta->name= NULL;
@@ -326,6 +327,7 @@ int reopen_text(Text *text)
Text *add_text(char *file, const char *relpath)
{
+ Main *bmain= G.main;
FILE *fp;
int i, llen, len, res;
unsigned char *buffer;
@@ -341,7 +343,7 @@ Text *add_text(char *file, const char *relpath)
fp= fopen(str, "r");
if(fp==NULL) return NULL;
- ta= alloc_libblock(&G.main->text, ID_TXT, BLI_path_basename(str));
+ ta= alloc_libblock(&bmain->text, ID_TXT, BLI_path_basename(str));
ta->id.us= 1;
ta->lines.first= ta->lines.last= NULL;