View Full Version : Checking if bad pointer?
steg90
22nd May 2007, 09:14
Hi,
Is it possible to check for a bad ptr, I don't just mean checking if it is NULL?
Regards,
Steve
marcel
22nd May 2007, 09:19
Of course there isn't.
If there be such a way, it would make things easier for everybody, right?
You could read a bit about QPointer.
Regards
steg90
22nd May 2007, 09:27
So nothing like if AfxIsValid or AfxIsValidAddress then?
Reason I am asking is for some reason, my dropMimeData function in my model is getting called when I double click on the table view that is using the model.
Regards,
Steve
marcel
22nd May 2007, 09:36
Then why don't you use AfxIsValidAddress?
There is also a solution for Mac: http://lists.apple.com/archives/Darwin-dev/2006/Jun/msg00326.html.
Not sure on Linux, but there has to be.
Anyway, you could split this code in three platform dependent parts ( Win, Linux, Mac ). But this is only if you need your app running on other platforms.
Regards
steg90
22nd May 2007, 10:06
Thanks for the link ;)
Regards,
Steve
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.