[commit] r1233 - trunk/GME/Mga
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Thu Mar 31 10:15:57 CDT 2011
Author: ksmyth
Date: Thu Mar 31 10:15:57 2011
New Revision: 1233
Log:
GetUndoQueueSize may return NULL
Modified:
trunk/GME/Mga/MgaProject.cpp
Modified: trunk/GME/Mga/MgaProject.cpp
==============================================================================
--- trunk/GME/Mga/MgaProject.cpp Wed Mar 30 15:18:26 2011 (r1232)
+++ trunk/GME/Mga/MgaProject.cpp Thu Mar 31 10:15:57 2011 (r1233)
@@ -1904,9 +1904,11 @@
COMTHROW(mgareg.CoCreateInstance(OLESTR("MGA.MgaRegistrar")));
CComBSTR undo_size;
COMTHROW( mgareg->GetUndoQueueSize( REGACCESS_USER, &undo_size));
- int val = _wtoi(undo_size);
- if (val > 0 && val < 100) // requirement is to be above 0 and below 100
- retval = val;
+ if (undo_size != NULL && undo_size != L"") {
+ int val = _wtoi(undo_size);
+ if (val > 0 && val < 100) // requirement is to be above 0 and below 100
+ retval = val;
+ }
}
catch( hresult_exception&)
{
More information about the gme-commit
mailing list