uiacceltk/hitchcock/backgroundanim/refplugin/src/shader.c
changeset 13 8f67d927ea57
parent 0 15bf7259bb7c
--- a/uiacceltk/hitchcock/backgroundanim/refplugin/src/shader.c	Tue Feb 02 07:56:43 2010 +0200
+++ b/uiacceltk/hitchcock/backgroundanim/refplugin/src/shader.c	Fri Mar 19 09:43:21 2010 +0200
@@ -46,7 +46,11 @@
     fseek (file, 0, SEEK_END);
     len = ftell (file);
     fseek(file, 0, SEEK_SET);
-
+    if (len<0)
+        {
+        fclose(file);
+        return 0;
+        }
     shaderdata = (char*)malloc(len+1);
     if (!shaderdata)
         {