mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-18 11:54:30 +01:00
Don't call a non-set callback.
This commit is contained in:
1 parent
0e34574bd7
commit
ca6b5b67d5
2 files changed
+4
-2
No files matched your search
+1
-1
@@ -314,7 +314,7 @@ void Download::SetFailed(int code) {
|
||||
void Download::Do(std::shared_ptr<Download> self) {
|
||||
// as long as this is in scope, we won't get destructed.
|
||||
// yeah this is ugly, I need to think about how life time should be managed for these...
|
||||
std::shared_ptr<Download> self_ = self;
|
||||
std::shared_ptr<Download> self_ = self;
|
||||
resultCode_ = 0;
|
||||
|
||||
Url fileUrl(url_);
|
||||
|
||||
+3
-1
@@ -102,7 +102,9 @@ public:
|
||||
callback_ = callback;
|
||||
}
|
||||
void RunCallback() {
|
||||
callback_(*this);
|
||||
if (callback_) {
|
||||
callback_(*this);
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in new issue
Block a user