bmalloc: Miscellaneous cleanup
[WebKit-https.git] / Source / bmalloc / bmalloc / Vector.h
index 5b4112be63cc97fe14614a80866a6896732d7914..2cda0dda2e7ebf75f0270a23008dd8242274b4b0 100644 (file)
@@ -88,7 +88,8 @@ inline Vector<T>::Vector()
 template<typename T>
 Vector<T>::~Vector()
 {
-    vmDeallocate(m_buffer, vmSize(m_capacity * sizeof(T)));
+    if (m_buffer)
+        vmDeallocate(m_buffer, vmSize(m_capacity * sizeof(T)));
 }
 
 template<typename T>