History

Make sure we don't use raw resource ptr

Atlante45 committed 10 years ago

Commit afdfef11 parent b9521478 files · +71 −58Browse files

Showing the changes to interface/src/scripting/GlobalServicesScriptingInterface.cpp (1 of 8 files). Show all

Unified · Split

interface/src/scripting/GlobalServicesScriptingInterface.cpp+2−2
@@ -122,8 +122,8 @@ void DownloadInfoResultFromScriptValue(const QScriptValue& object, DownloadInfoR · 121 unmodified lines
122122
123123 DownloadInfoResult GlobalServicesScriptingInterface::getDownloadInfo() {
124124 DownloadInfoResult result;
125− foreach(Resource* resource, ResourceCache::getLoadingRequests()) {
126− result.downloading.append(resource->getProgress() * 100.0f);
125+ foreach(QSharedPointer<Resource> resource, ResourceCache::getLoadingRequests()) {
126+ result.downloading.append(resource ? (resource->getProgress() * 100.0f) : 0.0f);
127127 }
128128 result.pending = ResourceCache::getPendingRequestCount();
129129 return result;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t