Bug 1338508 - fix false positive for static analysis. r?mstange draft
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Fri, 10 Feb 2017 14:45:46 +0200
changeset 481684 1ebe98719b3cd8380ab635d6cf1445a3f1f2a68a
parent 481595 25a94c1047e793ef096d8556fa3c26dd72bd37d7
child 481689 99edcbbda9b5b87b055e87963f43eb71788a6236
push id44917
push userbmo:bpostelnicu@mozilla.com
push dateFri, 10 Feb 2017 12:52:18 +0000
reviewersmstange
bugs1338508
milestone54.0a1
Bug 1338508 - fix false positive for static analysis. r?mstange MozReview-Commit-ID: 6XMouTU891N
tools/profiler/core/Sampler.cpp
--- a/tools/profiler/core/Sampler.cpp
+++ b/tools/profiler/core/Sampler.cpp
@@ -1140,17 +1140,17 @@ Sampler::doNativeBacktrace(ThreadInfo& a
 static void
 doSampleStackTrace(ThreadInfo& aInfo, TickSample* aSample,
                    bool aAddLeafAddresses)
 {
   NativeStack nativeStack = { nullptr, nullptr, 0, 0 };
   mergeStacksIntoProfile(aInfo, aSample, nativeStack);
 
 #ifdef ENABLE_LEAF_DATA
-  if (aSample && aAddLeafAddresses) {
+  if (aAddLeafAddresses) {
     aInfo.addTag(ProfileEntry::NativeLeafAddr((void*)aSample->pc));
   }
 #endif
 }
 
 void
 Sampler::Tick(TickSample* sample)
 {