|
@@ -572,7 +572,7 @@ Error ResourceLoaderText::load() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if (progress) {
|
|
|
|
|
|
+ if (progress && resources_total > 0) {
|
|
*progress = resource_current / float(resources_total);
|
|
*progress = resource_current / float(resources_total);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -640,7 +640,7 @@ Error ResourceLoaderText::load() {
|
|
return error;
|
|
return error;
|
|
} else {
|
|
} else {
|
|
error = OK;
|
|
error = OK;
|
|
- if (progress) {
|
|
|
|
|
|
+ if (progress && resources_total > 0) {
|
|
*progress = resource_current / float(resources_total);
|
|
*progress = resource_current / float(resources_total);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -674,7 +674,7 @@ Error ResourceLoaderText::load() {
|
|
|
|
|
|
resource_current++;
|
|
resource_current++;
|
|
|
|
|
|
- if (progress) {
|
|
|
|
|
|
+ if (progress && resources_total > 0) {
|
|
*progress = resource_current / float(resources_total);
|
|
*progress = resource_current / float(resources_total);
|
|
}
|
|
}
|
|
|
|
|