[ Albert Astals ] * Fix use of un-initialized memory Since m_valid was not initialized calling setValid ends up in an uninitialized memory use in the if comparison. The other thing setValid does is emitting a signal, but this is the constructor, so you don't need the signal either, so basically just assign the variable directly .