diff options
author | Jens Verwiebe <info@jensverwiebe.de> | 2012-03-14 16:03:49 +0400 |
---|---|---|
committer | Jens Verwiebe <info@jensverwiebe.de> | 2012-03-14 16:03:49 +0400 |
commit | 639cf31f8a91ba6014556be97419afc3fb0797ea (patch) | |
tree | c52e76a1aad18b549a5fa08fbfe0cd6cf4a442e2 | |
parent | f1da62d31fa4648ed9fe9a29b3d0b61a0261884d (diff) |
Avoid a sigsev after 44830 when reports is empty, clang compile work
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/report.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ddf2f18312c..c40aa64f213 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -267,7 +267,7 @@ if(APPLE) 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") diff --git a/source/blender/blenkernel/intern/report.c b/source/blender/blenkernel/intern/report.c index 04bb45df282..73809e7b5e8 100644 --- a/source/blender/blenkernel/intern/report.c +++ b/source/blender/blenkernel/intern/report.c @@ -276,11 +276,11 @@ Report *BKE_reports_last_displayable(ReportList *reports) 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; } |