Skip to content

Commit

Permalink
Merge pull request #2064 from kif/2047_segfault_in_calib2
Browse files Browse the repository at this point in the history
Explicitely close the dialog to prevent crash
  • Loading branch information
kif authored Jan 30, 2024
2 parents 9a9a7f2 + 4d4a280 commit a0fb45f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/pyFAI/gui/widgets/LoadImageToolButton.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# coding: utf-8
# /*##########################################################################
#
# Copyright (C) 2016-2018 European Synchrotron Radiation Facility
# Copyright (C) 2016-2024 European Synchrotron Radiation Facility
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -25,7 +25,7 @@

__authors__ = ["V. Valls"]
__license__ = "MIT"
__date__ = "16/10/2020"
__date__ = "29/01/2024"

import fabio
import os
Expand Down Expand Up @@ -88,6 +88,8 @@ def __execute(self):
data = None

self.parent()._setValue(filename=filename, data=data)
# adress #2047
dialog.deleteLater()


class _LoadImageFromImageDialogAction(qt.QAction):
Expand All @@ -112,6 +114,8 @@ def __execute(self):
url = dialog.selectedUrl()
data = dialog.selectedImage()
self.parent()._setValue(filename=url, data=data)
# adress #2047
dialog.deleteLater()


class LoadImageToolButton(qt.QToolButton):
Expand Down

0 comments on commit a0fb45f

Please sign in to comment.