mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
fixed crash on server when the content of an empty folder is requested (browsing)
This commit is contained in:
parent
cbfd626458
commit
d28b56db17
@ -155,6 +155,8 @@ void FolderController::service(HttpRequest& request, HttpResponse& response)
|
|||||||
t.setVariable(QString("path%1.name").arg(i-1),DBHelper::getFolderName(libraryId,foldersPath[i].first));
|
t.setVariable(QString("path%1.name").arg(i-1),DBHelper::getFolderName(libraryId,foldersPath[i].first));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(folderContent.length() > 0)
|
||||||
|
{
|
||||||
t.loop("element",numFoldersAtCurrentPage);
|
t.loop("element",numFoldersAtCurrentPage);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while(i<numFoldersAtCurrentPage)
|
while(i<numFoldersAtCurrentPage)
|
||||||
@ -224,6 +226,10 @@ void FolderController::service(HttpRequest& request, HttpResponse& response)
|
|||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
t.loop("element",0);
|
||||||
|
}
|
||||||
|
|
||||||
if(numPages > 1)
|
if(numPages > 1)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user