summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-03-20 09:35:33 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-03-20 09:35:33 -0700
commit8f91b30a67f9d13550eb2edd94e55490089c4787 (patch)
tree3b08d1f09e73b2b678e695d1df8fa0a4dcaabcae /src
parentc347f2b90b1164fe50b4bb061b3cd4e63bbfeda4 (diff)
downloadabc-8f91b30a67f9d13550eb2edd94e55490089c4787.tar.gz
abc-8f91b30a67f9d13550eb2edd94e55490089c4787.tar.bz2
abc-8f91b30a67f9d13550eb2edd94e55490089c4787.zip
Bug fix to prevent crashing when Abc_Print() is called while ABC is not initialized.
Diffstat (limited to 'src')
-rw-r--r--src/base/main/mainFrame.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/base/main/mainFrame.c b/src/base/main/mainFrame.c
index f8d0d352..5d21543b 100644
--- a/src/base/main/mainFrame.c
+++ b/src/base/main/mainFrame.c
@@ -78,8 +78,8 @@ void Abc_FrameSetLibVer( void * pLib ) { s_GlobalFrame->pL
void Abc_FrameSetFlag( char * pFlag, char * pValue ) { Cmd_FlagUpdateValue( s_GlobalFrame, pFlag, pValue ); }
void Abc_FrameSetCex( Abc_Cex_t * pCex ) { ABC_FREE( s_GlobalFrame->pCex ); s_GlobalFrame->pCex = pCex; }
-int Abc_FrameIsBridgeMode() { return s_GlobalFrame->fBridgeMode; }
-void Abc_FrameSetBridgeMode() { s_GlobalFrame->fBridgeMode = 1; }
+int Abc_FrameIsBridgeMode() { return s_GlobalFrame ? s_GlobalFrame->fBridgeMode : 0; }
+void Abc_FrameSetBridgeMode() { if ( s_GlobalFrame ) s_GlobalFrame->fBridgeMode = 1; }
/**Function*************************************************************