[commit] r2151 - trunk/GME/Search

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Wed Feb 13 12:46:20 CST 2013


Author: ksmyth
Date: Wed Feb 13 12:46:19 2013
New Revision: 2151

Log:
META-590: fix crash when clicking Search with Search within results checked when there is are no current search results

Modified:
   trunk/GME/Search/SearchDlg.cpp

Modified: trunk/GME/Search/SearchDlg.cpp
==============================================================================
--- trunk/GME/Search/SearchDlg.cpp	Tue Feb 12 13:47:45 2013	(r2150)
+++ trunk/GME/Search/SearchDlg.cpp	Wed Feb 13 12:46:19 2013	(r2151)
@@ -246,10 +246,13 @@
 	}
     if(CWnd::UpdateData(TRUE))
     {
-        if(m_searchResults)
+        if (m_searchResults)
         {
-            SearchResults();
-            CreateSearchHistory();
+			if (results != nullptr) // TODO: should probably EnableWindow(FALSE) the Search button instead
+			{
+				SearchResults();
+				CreateSearchHistory();
+			}
             return;
         }
 
@@ -930,6 +933,8 @@
 
 void CSearchDlg::SearchResults()
 {
+	if (results == nullptr)
+		return;
     CSearchCtrl *TheCtrl = GetCtrl();
     CComPtr<IMgaProject> ccpProject = TheCtrl->GetProject();
     m_pgsSearch.ShowWindow(SW_RESTORE);


More information about the gme-commit mailing list