[qet] [4243] Bug fix.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 4243
Author:   blacksun
Date:     2015-10-29 16:14:42 +0100 (Thu, 29 Oct 2015)
Log Message:
-----------
Bug fix.

Modified Paths:
--------------
    trunk/sources/ui/linksingleelementwidget.cpp

Modified: trunk/sources/ui/linksingleelementwidget.cpp
===================================================================
--- trunk/sources/ui/linksingleelementwidget.cpp	2015-10-25 23:49:33 UTC (rev 4242)
+++ trunk/sources/ui/linksingleelementwidget.cpp	2015-10-29 15:14:42 UTC (rev 4243)
@@ -33,7 +33,7 @@
 LinkSingleElementWidget::LinkSingleElementWidget(Element *elmt, QWidget *parent) :
 	AbstractElementPropertiesEditorWidget(parent),
 	ui(new Ui::LinkSingleElementWidget),
-	esw_(0),
+	esw_(nullptr),
 	unlink_(false),
 	search_field(nullptr)
 {
@@ -269,6 +269,8 @@
 		//find in all diagram of this project
 	if (i == 0)
 	{
+		if (!m_element->diagram() || !m_element->diagram()->project()) return elmt_list;
+
 		ElementProvider ep(m_element->diagram()->project());
 		if (filter_ & Element::AllReport)
 			elmt_list = ep.freeElement(filter_);
@@ -284,6 +286,8 @@
 		else
 			elmt_list = ep.find(filter_);
 	}
+
+
 		//If element is linked, remove is parent from the list
 	if(!m_element->isFree()) elmt_list.removeAll(m_element->linkedElements().first());
 


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/