trying some shader stuff, but segfaults
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
|
||||
#include "../ImNodeFlow.h"
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <iterator>
|
||||
#include <ostream>
|
||||
|
||||
@ -20,12 +20,11 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "../ImNodeFlow.h"
|
||||
#include "../image_model.h"
|
||||
#include "../imfilebrowser.h"
|
||||
#include "../stb_image.h"
|
||||
#include "../uuid.h"
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
#include "../emscripten_browser_file.h"
|
||||
@ -54,7 +53,11 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
~Exposure() { stbi_image_free(returnBundle.image); }
|
||||
~Exposure() {
|
||||
if (returnBundle.loaded) {
|
||||
stbi_image_free(returnBundle.image);
|
||||
}
|
||||
}
|
||||
|
||||
void draw() override {
|
||||
ImGui::SetNextItemWidth(100);
|
||||
@ -158,7 +161,11 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
~Contrast() { stbi_image_free(returnBundle.image); }
|
||||
~Contrast() {
|
||||
if (returnBundle.loaded) {
|
||||
stbi_image_free(returnBundle.image);
|
||||
}
|
||||
}
|
||||
|
||||
void draw() override {
|
||||
ImGui::SetNextItemWidth(100);
|
||||
@ -263,7 +270,11 @@ public:
|
||||
});
|
||||
}
|
||||
|
||||
~SimpleBrightness() { stbi_image_free(returnBundle.image); }
|
||||
~SimpleBrightness() {
|
||||
if (returnBundle.loaded) {
|
||||
stbi_image_free(returnBundle.image);
|
||||
}
|
||||
}
|
||||
|
||||
void draw() override {
|
||||
ImGui::SetNextItemWidth(100);
|
||||
|
Reference in New Issue
Block a user