g_return_val_if_fail(DispatcherContext!=NULL,ExceptionNestedException);
g_return_val_if_fail(ExceptionHandler!=NULL,ExceptionNestedException);
- if (nested)
- g_assert_not_reached();
+ /* Nest-counting is provided here just for debugging reasons. */
+ /* Nesting must be permitted for proper FSCTL_DISMOUNT_VOLUME execution. */
nested++;
r=(*ExceptionHandler)(ExceptionRecord,RegistrationFrame,Context,DispatcherContext);
nested--;
- g_assert(!nested);
+ g_assert(nested>=0);
g_assert(r==ExceptionContinueExecution || r==ExceptionContinueSearch);
return r;
g_return_val_if_fail(DispatcherContext!=NULL,ExceptionNestedException);
g_return_val_if_fail(ExceptionHandler!=NULL,ExceptionNestedException);
+ /* Nest-counting is provided here just for debugging reasons. */
if (nested)
g_assert_not_reached();