Author: cgutman
Date: Sat Oct 29 15:03:01 2011
New Revision: 54268
URL:
http://svn.reactos.org/svn/reactos?rev=54268&view=rev
Log:
[FSLIB]
- Don't call the callback if the caller didn't give one
Modified:
trunk/reactos/lib/fslib/ext2lib/Mke2fs.c
trunk/reactos/lib/fslib/vfatlib/vfatlib.c
trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c
Modified: trunk/reactos/lib/fslib/ext2lib/Mke2fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/ext2lib/Mke2fs.c…
==============================================================================
--- trunk/reactos/lib/fslib/ext2lib/Mke2fs.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/ext2lib/Mke2fs.c [iso-8859-1] Sat Oct 29 15:03:01 2011
@@ -820,7 +820,10 @@
ULONG ret_blk;
- Callback(PROGRESS, 0, (PVOID)&Percent);
+ if (Callback != NULL)
+ {
+ Callback(PROGRESS, 0, (PVOID)&Percent);
+ }
RtlZeroMemory(&Ext2Sb, sizeof(EXT2_SUPER_BLOCK));
@@ -997,7 +1000,10 @@
Ext2CloseDevice(&FileSys);
- Callback(DONE, 0, (PVOID)&bRet);
+ if (Callback != NULL)
+ {
+ Callback(DONE, 0, (PVOID)&bRet);
+ }
return Status;
}
Modified: trunk/reactos/lib/fslib/vfatlib/vfatlib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/vfatlib.…
==============================================================================
--- trunk/reactos/lib/fslib/vfatlib/vfatlib.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/vfatlib/vfatlib.c [iso-8859-1] Sat Oct 29 15:03:01 2011
@@ -294,7 +294,10 @@
if (NewPercent > Context->Percent)
{
Context->Percent = NewPercent;
- Context->Callback (PROGRESS, 0, &Context->Percent);
+ if (Context->Callback != NULL)
+ {
+ Context->Callback (PROGRESS, 0, &Context->Percent);
+ }
}
}
Modified: trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatxlib/vfatxli…
==============================================================================
--- trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/vfatxlib/vfatxlib.c [iso-8859-1] Sat Oct 29 15:03:01 2011
@@ -169,7 +169,10 @@
if (NewPercent > Context->Percent)
{
Context->Percent = NewPercent;
- Context->Callback(PROGRESS, 0, &Context->Percent);
+ if (Context->Callback != NULL)
+ {
+ Context->Callback(PROGRESS, 0, &Context->Percent);
+ }
}
}