Skip to content

Commit

Permalink
fix crash on missing dragEffect.plist
Browse files Browse the repository at this point in the history
  • Loading branch information
Cvolton committed Aug 9, 2024
1 parent 3f5962f commit 90d1902
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/ParticleHelper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//stolen from https://github.com/Alphalaneous/Projected-Stars/blob/main/src/ParticleHelper.hpp
#pragma once
#include "Geode/cocos/cocoa/CCDictionary.h"
#include <Geode/Geode.hpp>

using namespace geode::prelude;
Expand All @@ -10,6 +11,7 @@ class ParticleHelper {
static CCParticleSystemQuad* createStarParticles(int maxParticles) {

auto dict = CCDictionary::createWithContentsOfFileThreadSafe("dragEffect.plist");
if(!dict) dict = CCDictionary::create();

dict->setObject(CCString::create("1"), "emitterType");
dict->setObject(CCString::create("-1"), "duration");
Expand Down

0 comments on commit 90d1902

Please sign in to comment.