2
0
Fork 0

Documents folder permission crash fix

This commit is contained in:
George Reales 2020-12-06 14:57:23 +01:00
parent cecc1adf74
commit 3f32716745
3 changed files with 10 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -47,9 +47,15 @@ void ObxdAudioProcessorEditor::loadSkin (ObxdAudioProcessor& ownerFilter)
return; return;
} }
//if (coords.createInputStream())
XmlDocument skin (coords); XmlDocument skin (coords);
auto doc = skin.getDocumentElement(); auto doc = skin.getDocumentElement();
if (doc) { if (!doc) {
notLoadSkin = true;
setSize (1440, 450);
}
else {
if (doc->getTagName() == "PROPERTIES"){ if (doc->getTagName() == "PROPERTIES"){
@ -483,7 +489,7 @@ void ObxdAudioProcessorEditor::updateFromHost() {
} }
// Set to unlearn to false // Set to unlearn to false
if ( midiUnlearnButton->getToggleState()) { if ( midiUnlearnButton && midiUnlearnButton->getToggleState()) {
midiUnlearnButton->setToggleState(false, NotificationType:: sendNotification); midiUnlearnButton->setToggleState(false, NotificationType:: sendNotification);
} }
@ -511,7 +517,7 @@ void ObxdAudioProcessorEditor::paint(Graphics& g)
const File mainFile(skinFolder.getChildFile("main@2x.png")); const File mainFile(skinFolder.getChildFile("main@2x.png"));
#endif #endif
if (skinFolder.exists() && mainFile.exists()) if (!notLoadSkin && skinFolder.exists() && mainFile.exists())
{ {
const Image image = ImageCache::getFromFile(mainFile); const Image image = ImageCache::getFromFile(mainFile);

View File

@ -143,6 +143,7 @@ private:
OwnedArray<PopupMenu> popupMenus; OwnedArray<PopupMenu> popupMenus;
bool notLoadSkin = false;
int progStart; int progStart;
int bankStart; int bankStart;
int skinStart; int skinStart;