fixed a bug that, when in module editor a module was not loaded, the null pointer to this
module would not be dereferenced.
This commit is contained in:
parent
ee194b63a8
commit
d6fcb879bf
|
@ -317,14 +317,18 @@ wxClientDC dc(DrawPanel);
|
||||||
if ( m_Pcb->m_Modules ) m_Pcb->m_Modules->m_Flags = 0;
|
if ( m_Pcb->m_Modules ) m_Pcb->m_Modules->m_Flags = 0;
|
||||||
//if either m_Reference or m_Value are gone, reinstate them -
|
//if either m_Reference or m_Value are gone, reinstate them -
|
||||||
//otherwise it becomes hard to see what you are working with in the layout!
|
//otherwise it becomes hard to see what you are working with in the layout!
|
||||||
TEXTE_MODULE* ref = m_Pcb->m_Modules->m_Reference;
|
if(m_Pcb && m_Pcb->m_Modules){
|
||||||
TEXTE_MODULE* val = m_Pcb->m_Modules->m_Value;
|
TEXTE_MODULE* ref = m_Pcb->m_Modules->m_Reference;
|
||||||
ref->m_NoShow = 0;
|
TEXTE_MODULE* val = m_Pcb->m_Modules->m_Value;
|
||||||
val->m_NoShow = 0;
|
if(val & ref){
|
||||||
ref->m_Type = 0;
|
ref->m_NoShow = 0;
|
||||||
val->m_Type = 1;
|
val->m_NoShow = 0;
|
||||||
if(ref->m_Text.Length() == 0) ref->m_Text = L"Ref**";
|
ref->m_Type = 0;
|
||||||
if(val->m_Text.Length() == 0) val->m_Text = L"Val**";
|
val->m_Type = 1;
|
||||||
|
if(ref->m_Text.Length() == 0) ref->m_Text = L"Ref**";
|
||||||
|
if(val->m_Text.Length() == 0) val->m_Text = L"Val**";
|
||||||
|
}
|
||||||
|
}
|
||||||
GetScreen()->ClrModify();
|
GetScreen()->ClrModify();
|
||||||
Zoom_Automatique(TRUE);
|
Zoom_Automatique(TRUE);
|
||||||
if ( m_Draw3DFrame )
|
if ( m_Draw3DFrame )
|
||||||
|
|
Loading…
Reference in New Issue