S
snabhi
Guest
For a ComboBox item, we are calling GetItemDataPtr() function and casting the return value to double* (using C-style cast). Then we are dereferencing the casted pointer. But the application is crashing because the pointer has became NULL.
Issue code:
(*((double*) GetItemDataPtr(nIndex)))
Are there any scenarios where GetItemDataPtr() can return NULL?
Or C-style casting to double* is causing problem?
I can't debug the crash since I'm analyzing this crash using dump files. Also, I'm not able to find whether casting double* is causing NULL or GetItemDataPtr() itself is returning NULL.
Kindly let me know what might be the root cause.
Regards,
Abhilash
Continue reading...
Issue code:
(*((double*) GetItemDataPtr(nIndex)))
Are there any scenarios where GetItemDataPtr() can return NULL?
Or C-style casting to double* is causing problem?
I can't debug the crash since I'm analyzing this crash using dump files. Also, I'm not able to find whether casting double* is causing NULL or GetItemDataPtr() itself is returning NULL.
Kindly let me know what might be the root cause.
Regards,
Abhilash
Continue reading...