title: Segmentation fault using OpenCV
body: <p>i am currently writing my first C++ program and so far, even if it's not complete, i wanted to try some test runs, after dealing with all compiler errors. I'll provide most of the code in the following links:
  <a href="http://pastie.org/8196032" rel="nofollow">http://pastie.org/8196032</a>
  <a href="http://pastie.org/8196025" rel="nofollow">http://pastie.org/8196025</a>
  Since i'm just allowed to post 2 links the header for ImageComparison is missing, which is not very important i think. stdafx.h includes required opencv and std libs.
  I ran gdb and got this result:</p>
  
  <pre><code>Program received signal SIGSEGV, Segmentation fault.
  0x000000000040655c in cv::Mat::release() ()
  (gdb) bt
  &gt;#0  0x000000000040655c in cv::Mat::release() ()
  &gt;#1  0x0000000000406410 in cv::Mat::operator=(cv::Mat const&amp;) ()
  &gt;#2  0x00000000004052ed in ImageComparison::LoadImages() ()
  &gt;#3  0x000000000040518e in ImageComparison::DoImCo() ()
  #4  0x0000000000405019 in main () 
  </code></pre>
  
  <p>Which doesn't give me any clue what's wrong here.
  I apologize if my question is just to dump, but i appreciate any suggestions. </p>