[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17008] trunk/blender/source/blender: This commit fixes bug: [#17770] Texture Plugins do not work.
Kent Mein
mein at cs.umn.edu
Fri Oct 10 19:52:25 CEST 2008
Revision: 17008
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17008
Author: sirdude
Date: 2008-10-10 19:52:25 +0200 (Fri, 10 Oct 2008)
Log Message:
-----------
This commit fixes bug: [#17770] Texture Plugins do not work. (on windows)
Thanks to Lguillaume for helping with this one.
Had to go back to bug: [#17631] PIL_dynlib_get_error_as_string() returns NULL, causes crash
and revert the fix and make some new updates.
function needs to return NULL so fix the functions that were assuming it
always returns a string.
Kent
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/dynlib.c
trunk/blender/source/blender/imbuf/intern/dynlibtiff.c
trunk/blender/source/blender/yafray/intern/export_Plugin.cpp
Modified: trunk/blender/source/blender/blenlib/intern/dynlib.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/dynlib.c 2008-10-10 14:22:54 UTC (rev 17007)
+++ trunk/blender/source/blender/blenlib/intern/dynlib.c 2008-10-10 17:52:25 UTC (rev 17008)
@@ -78,10 +78,7 @@
/* if lib is NULL reset the last error code */
err= GetLastError();
- if (!lib) {
- SetLastError(ERROR_SUCCESS);
- err = ERROR_SUCCESS;
- }
+ if (!lib) SetLastError(ERROR_SUCCESS);
if (err) {
static char buf[1024];
@@ -96,7 +93,7 @@
return buf;
}
- return "unrecognized error";
+ return err;
}
void PIL_dynlib_close(PILdynlib *lib) {
Modified: trunk/blender/source/blender/imbuf/intern/dynlibtiff.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/dynlibtiff.c 2008-10-10 14:22:54 UTC (rev 17007)
+++ trunk/blender/source/blender/imbuf/intern/dynlibtiff.c 2008-10-10 17:52:25 UTC (rev 17008)
@@ -106,8 +106,11 @@
assert(libtiff != NULL);
symbol = PIL_dynlib_find_symbol(libtiff, name);
if (symbol == NULL) {
- printf("libtiff_findsymbol: error %s\n",
- PIL_dynlib_get_error_as_string(libtiff));
+ char *err = PIL_dynlib_get_error_as_string(libtiff);
+
+ if (err) printf("libtiff_findsymbol: error %s\n",err);
+ else printf("libtiff_findsymbol: error Unknown.\n");
+
libtiff = NULL;
G.have_libtiff = (0);
return NULL;
Modified: trunk/blender/source/blender/yafray/intern/export_Plugin.cpp
===================================================================
--- trunk/blender/source/blender/yafray/intern/export_Plugin.cpp 2008-10-10 14:22:54 UTC (rev 17007)
+++ trunk/blender/source/blender/yafray/intern/export_Plugin.cpp 2008-10-10 17:52:25 UTC (rev 17008)
@@ -171,7 +171,9 @@
corehandle = PIL_dynlib_open((char *)(location + "\\yafraycore.dll").c_str());
if (corehandle==NULL)
{
- cerr << "Error loading yafray plugin: " << PIL_dynlib_get_error_as_string(corehandle) << endl;
+ char *err = PIL_dynlib_get_error_as_string(corehandle);
+ if (err) cerr << "Error loading yafray plugin: " << err << endl;
+ else cerr << "Error loading yafray plugin: Unknown." << endl;
return false;
}
location += "\\yafrayplugin.dll";
More information about the Bf-blender-cvs
mailing list