Revision: 44877
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44877
Author:   jensverwiebe
Date:     2012-03-14 12:03:49 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
Avoid a sigsev after 44830 when reports is empty, clang compile work

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/source/blender/blenkernel/intern/report.c

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt        2012-03-14 09:39:43 UTC (rev 44876)
+++ trunk/blender/CMakeLists.txt        2012-03-14 12:03:49 UTC (rev 44877)
@@ -267,7 +267,7 @@
        endif()
 
        if(${CMAKE_GENERATOR} MATCHES "Xcode")
-               if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} 
VERSION_GREATER 4)
+               if(${XCODE_VERSION} VERSION_EQUAL 4 OR ${XCODE_VERSION} 
VERSION_GREATER 4) # AND ${XCODE_VERSION} VERSION_LESS 4.3) in the works, needs 
collada fix for clang and gcc 4.7
                        # Xcode 4 defaults to the Apple LLVM Compiler.
                        # Override the default compiler selection because 
Blender only compiles with gcc
                        set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION 
"com.apple.compilers.llvmgcc42")

Modified: trunk/blender/source/blender/blenkernel/intern/report.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/report.c     2012-03-14 
09:39:43 UTC (rev 44876)
+++ trunk/blender/source/blender/blenkernel/intern/report.c     2012-03-14 
12:03:49 UTC (rev 44877)
@@ -276,11 +276,11 @@
 int BKE_reports_contain(ReportList *reports, ReportType level)
 {
        Report *report;
-
-       for(report=reports->list.first; report; report=report->next)
-               if(report->type >= level)
-                       return TRUE;
-       
+       if (reports != NULL) {
+               for(report=reports->list.first; report; report=report->next)
+                       if(report->type >= level)
+                               return TRUE;
+       }
        return FALSE;
 }
 

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to