Made the envvar stuff work and slightly simplified it ;-)
authorAlexander Ewering <blender@instinctive.de>
Tue, 22 Nov 2005 20:41:15 +0000 (20:41 +0000)
committerAlexander Ewering <blender@instinctive.de>
Tue, 22 Nov 2005 20:41:15 +0000 (20:41 +0000)
source/blender/imbuf/intern/dynlibtiff.c

index 553449cf15990f1809ebd37081e462f291bae237..1246b639cb1d22e1a0d2199075c9679d550a81d9 100644 (file)
@@ -75,7 +75,6 @@ void libtiff_loadlibtiff()
 {
        char *filename;
        libtiff = NULL;
-       int size;
 
        /* Try to find libtiff in a couple of standard places */
        libtiff = PIL_dynlib_open("libtiff.so");
@@ -93,13 +92,8 @@ void libtiff_loadlibtiff()
        libtiff = PIL_dynlib_open("/usr/openwin/lib/libtiff.so");
        if (libtiff != NULL)  return;
 
-       size = sizeof(getenv("BF_TIFF_LIB"));
-       
-       filename = MEM_mallocN(size * sizeof(unsigned char),"ENVVAR");
-       memcpy(filename,getenv("BF_TIFF_LIB"),size);
-       libtiff = PIL_dynlib_open(filename);
-       MEM_freeN(filename);
-       if (libtiff != NULL) return;
+       filename = getenv("BF_TIFF_LIB");
+       if (filename) libtiff = PIL_dynlib_open(filename);
 }
 
 void *libtiff_findsymbol(char *name)