int ICOperator::ICStarts( const char *port )
{
if ( NULL == OpenReader) { qDebug() << ""; }
this->devNo = this->OpenReader( 0, sPort );
return this->devNo;
}
As the function show, qDebug() is not actually executed, but program will crash, if comment as below:
int ICOperator::ICStarts( const char *port )
{
// if ( NULL == OpenReader) { qDebug() << ""; }
this->devNo = this->OpenReader( 0, sPort );
return this->devNo;
}
What happens in qDebug()? May stack error?
you app is crashing not because you are using the debug but coz your logic is not avoiding to use an invalid pointer.
if OpenReader is NULL then this is invalid
OpenReader( 0, sPort )