1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-02 10:24:11 +01:00

Try and cover a case that was making the waypointitem crash

This commit is contained in:
James Cotton 2012-06-02 18:35:28 -05:00
parent 0a842ac639
commit 8aab4755e4

View File

@ -97,8 +97,14 @@ namespace mapcontrol
{ {
if(event->button()==Qt::LeftButton) if(event->button()==Qt::LeftButton)
{ {
if(text) {
delete text; delete text;
text = NULL;
}
if(textBG) {
delete textBG; delete textBG;
textBG = NULL;
}
coord=map->FromLocalToLatLng(this->pos().x(),this->pos().y()); coord=map->FromLocalToLatLng(this->pos().x(),this->pos().y());
isDragging=false; isDragging=false;
RefreshToolTip(); RefreshToolTip();