From c941c715dc3f0fe55fdcdb15c97b6a568eb05c8f Mon Sep 17 00:00:00 2001 From: Mark Johnson Date: Tue, 25 Jul 2000 12:03:03 +0000 Subject: [PATCH] dbtree.cpp git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- demos/dbbrowse/dbtree.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/dbbrowse/dbtree.cpp b/demos/dbbrowse/dbtree.cpp index a19389c09b..6aa4fc61e5 100644 --- a/demos/dbbrowse/dbtree.cpp +++ b/demos/dbbrowse/dbtree.cpp @@ -100,8 +100,10 @@ DBTree::~DBTree() (pDoc->db_Br+i_Which)->cl_BrowserDB = NULL; delete ct_BrowserDB; delete p_imageListNormal; - delete popupMenu1; - delete popupMenu2; + if (popupMenu1) // If the DSN has no Tables, then no delete should be done ! + delete popupMenu1; + if (popupMenu1) // If the DSN has no Tables, then no delete should be done ! + delete popupMenu2; } //---------------------------------------------------------------------------------------- #undef TREE_EVENT_HANDLER